WordPress
WordPress is the world’s most popular open-source content management system, powering over 40% of all websites. This image ships a complete LAMP stack (Apache, MariaDB, and PHP) with WordPress pre-installed and ready to configure.
Software included
Section titled “Software included”| Component | Version |
|---|---|
| WordPress | 6.x (latest) |
| Apache | 2.4.x |
| MariaDB | 10.x |
| PHP | 8.3 |
| Ubuntu | 24.04 LTS |
Getting started
Section titled “Getting started”1. Connect to your VM
Section titled “1. Connect to your VM”ssh ubuntu@<your-vm-ip>2. Wait for first-boot configuration
Section titled “2. Wait for first-boot configuration”On the first boot, a setup script runs automatically. It:
- Creates the WordPress database and a dedicated database user with a randomly generated password
- Writes
wp-config.phpwith the database credentials and unique secret keys
This takes under 30 seconds. Track progress:
journalctl -u wordpress-first-boot.service -f3. Complete the WordPress setup wizard
Section titled “3. Complete the WordPress setup wizard”Open a browser and navigate to:
http://<your-vm-ip>The WordPress setup wizard will guide you through:
- Selecting your language
- Setting your site title
- Creating your WordPress admin username and password
- Entering your admin email address
4. Log in to the WordPress dashboard
Section titled “4. Log in to the WordPress dashboard”After completing the wizard, log in at:
http://<your-vm-ip>/wp-adminManaging WordPress
Section titled “Managing WordPress”Restart Apache:
sudo systemctl restart apache2Restart MariaDB:
sudo systemctl restart mariadbWordPress files are located in /var/www/wordpress/.
PHP configuration: /etc/php/8.3/apache2/php.ini
Apache virtual host: /etc/apache2/sites-available/wordpress.conf
Setting up HTTPS
Section titled “Setting up HTTPS”WordPress is served on port 80 (HTTP) by default. To enable HTTPS:
- Point a domain name at your VM’s IP address
- Install Certbot:
sudo apt install certbot python3-certbot-apache - Run:
sudo certbot --apache -d yourdomain.com
Certbot will automatically configure Apache for HTTPS and set up certificate renewal.
Security
Section titled “Security”Port 80 is open by default. UFW is enabled.
After setting up HTTPS, restrict HTTP traffic:
sudo ufw allow 443/tcpsudo ufw delete allow 80/tcp