Marketplace
Deploy this app

Blogs and Forums
WordPress
WordPress on Nginx, PHP-FPM and MySQL.
About
Installs a complete LEMP stack (Nginx, PHP-FPM, MySQL) and the latest WordPress core via WP-CLI, with a database and credentials generated automatically.
Finish the install wizard at http://<floating-ip>/. Database credentials and the admin setup link are saved to /root/wordpress-credentials.txt.
Ports opened by the installer
80/tcp · HTTP
Install script (runs as cloud-init user-data on first boot)
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y nginx mysql-server php-fpm php-mysql php-xml php-curl php-gd php-mbstring unzip curl
DB_PASS=$(openssl rand -base64 18 | tr -dc 'A-Za-z0-9')
mysql -e "CREATE DATABASE wordpress; CREATE USER 'wordpress'@'localhost' IDENTIFIED BY '$DB_PASS'; GRANT ALL ON wordpress.* TO 'wordpress'@'localhost'; FLUSH PRIVILEGES;"
curl -o /usr/local/bin/wp -sL https://github.com/wp-cli/wp-cli/releases/latest/download/wp-cli.phar
chmod +x /usr/local/bin/wp
mkdir -p /var/www/wordpress
cd /var/www/wordpress
wp core download --allow-root
wp config create --dbname=wordpress --dbuser=wordpress --dbpass="$DB_PASS" --allow-root
chown -R www-data:www-data /var/www/wordpress
PHP_SOCK=$(ls /run/php/*.sock | head -1)
cat > /etc/nginx/sites-available/wordpress <<NGINX
server {
listen 80 default_server;
root /var/www/wordpress;
index index.php;
location / { try_files \$uri \$uri/ /index.php?\$args; }
location ~ \.php$ {
fastcgi_pass unix:$PHP_SOCK;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
include fastcgi_params;
}
}
NGINX
rm -f /etc/nginx/sites-enabled/default
ln -sf /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/wordpress
systemctl restart nginx php*-fpm
cat > /root/wordpress-credentials.txt <<CREDS
Database: wordpress
DB user: wordpress
DB password: $DB_PASS
Finish setup at: http://THIS_SERVER_IP/wp-admin/install.php
CREDS
Minimum requirements
- vCPU
- 1
- Memory
- 1 GB
- Disk
- 20 GB
- Base image
- ubuntu
