WordPress on Ubuntu 24.04

The WordPress image boots Ubuntu 24.04 with Nginx, PHP-FPM, MariaDB and the latest WordPress files in place, with the database already created. You open the server IP in a browser, fill in the site title and admin account, and the site is live.

Image facts

Image
WordPress on Ubuntu 24.04
Type
App image (Ubuntu 24.04 with the app set up)
Architectures
x86-64 and Arm64 (all four families)
Price
Free on every plan
Login
root over SSH with your key, or a one-time root password
Locations
All 15

Sizes that suit it

PlanWhySizePer monthOrder from
P2A cached blog or brochure site, any city1 vCPU, 2 GB RAM, 40 GB NVMe$6.95$41.70 for 6 months
S4Shops and busier sites in Europe2 vCPU, 4 GB RAM, 40 GB NVMe$4.25$51.00 for 12 months
P4WooCommerce for visitors outside Europe2 vCPU, 4 GB RAM, 80 GB NVMe$12.05$72.30 for 6 months

What does the WordPress image install?

You get a LEMP stack sized for one WordPress site: Nginx as the web server, PHP-FPM from the Ubuntu 24.04 archive with the extensions WordPress asks for in its Site Health screen (mysqli, curl, gd, intl, mbstring, xml, zip, imagick), and MariaDB as the database. A database and a database user for WordPress are created during the first boot, and wp-config.php is already filled with those details and fresh security salts.

The Nginx server block answers on the server IP, sends PHP to the FPM socket and uses the pretty-permalink rule try_files $uri $uri/ /index.php?$args;, so permalinks work as soon as you enable them. If a large theme ZIP fails to upload, raise upload_max_filesize in the PHP-FPM php.ini and client_max_body_size in Nginx together.

What happens on the first visit to the server IP?

The famous five-minute install, minus the database step. Open http://your-server-ip/ and WordPress asks for the language, the site title, an admin username, a password and an email address for that user. After you press Install, you land on the login page at /wp-admin.

Do this soon after the server starts. Until the installer is finished, anyone who finds the IP could complete it, so treat the first visit as part of the deploy. The database credentials and any other generated details for the image are shown in the message of the day when you log in over SSH, in case you need them for a migration plugin or a manual import.

Choose an admin username other than admin and a long password. Login attempts against /wp-login.php start within days on any public IP.

How much server does a WordPress site need?

Memory is the limit, and it is split between MariaDB and the PHP-FPM workers. MariaDB with a small buffer pool takes 150~300 MB; each PHP worker serving a page with a page builder and WooCommerce can use 60~120 MB. A blog with a caching plugin runs on 1 vCPU, 2 GB RAM, 40 GB NVMe, which leaves room for four to six workers.

Shops, membership sites and multilingual sites do more uncached work per visitor, so give them 2 vCPU, 4 GB RAM, 40 GB NVMe or more and raise pm.max_children in the FPM pool to match. A simple rule: free memory after MariaDB, divided by the size of one worker, is your ceiling for children.

Disk needs are modest: WordPress, a theme and a dozen plugins fit in under 1 GB. The wp-content/uploads folder is what grows, so a photo-heavy site benefits from the 80 GB of S8. Our WordPress use case compares site types in more detail.

How do I put the site on a domain with HTTPS?

Point an A record (and an AAAA record for IPv6) at the server, then change the site address and request a certificate. The order matters: WordPress stores its own URL in the database, so update it first.

  1. In Settings, General, set both WordPress Address and Site Address to https://example.com.
  2. Set server_name example.com www.example.com; in the Nginx site file and run nginx -t && systemctl reload nginx.
  3. Install Certbot with apt install certbot python3-certbot-nginx and run certbot --nginx -d example.com -d www.example.com. It edits the server block for TLS and adds the HTTP to HTTPS redirect.

Renewal is automatic through the certbot.timer systemd unit. The DNS guide and Nginx HTTPS guide cover each step with screenshots of the records.

Which ports should be open, and how do I lock down logins?

Only three: 22 for SSH, 80 and 443 for the site. MariaDB listens on localhost only, which is correct; there is no reason to publish 3306. With ufw that is:

ufw allow OpenSSH\nufw allow "Nginx Full"\nufw enable

For the WordPress side, keep the number of admin accounts small, use an authenticator-based two-factor plugin for them, and set define('DISALLOW_FILE_EDIT', true); in wp-config.php so a stolen admin session cannot edit PHP files from the dashboard. A rate limit on wp-login.php with Nginx limit_req, or fail2ban reading the Nginx log, cuts the noise from password-guessing bots.

How do I back up and restore WordPress?

A WordPress backup is two things: a database dump and the wp-content folder. Everything else can be downloaded again. A nightly cron job covers both:

mysqldump --single-transaction wordpress | gzip > /root/wp-db.sql.gz\ntar czf /root/wp-content.tar.gz -C /var/www/html wp-content

Adjust the database name and the web root to what the message of the day lists for your server, then copy the two files somewhere other than the VPS. Backup plugins that push to cloud storage do the same job with a dashboard on top.

For whole-disk protection, the backup add-on keeps seven daily copies for $1.39 a month on P2 or $0.85 on S4. That is the quick way back after a plugin update breaks the site: open a ticket with the server name and the day before the update.

How are WordPress, PHP and MariaDB updated?

The stack updates in two places. Ubuntu packages, including Nginx, PHP and MariaDB security fixes, come through apt update && apt upgrade; turning on unattended-upgrades applies security fixes daily without you. WordPress core, themes and plugins update from Dashboard, Updates, and minor core releases install on their own by default.

Major WordPress releases and big plugin updates deserve a test first. The cheap way is a second small server rebuilt with this image, where you restore last night's backup and run the update before touching the live site. If you install WP-CLI, wp core update and wp plugin update --all do the same from the shell and fit nicely into a script.

Which plan and city should I choose for WordPress?

Choose the city nearest your readers, because the time to first byte of an uncached page grows with distance. A site for Europe runs best from one of the seven European cities, where the Shared vCPU plans give 2 vCPU, 4 GB RAM, 40 GB NVMe for $4.25 a month. A site for North America or Asia should use the Performance family, available in all 15 cities; P2 costs $6.95 and is ordered as $41.70 for 6 months.

Traffic is rarely the limit for WordPress: even 0.5 TB a month covers hundreds of thousands of page views of a typical site. Every plan in Europe includes 20 TB.

WordPress on Ubuntu 24.04 questions

Is the WordPress image a multisite install?

It is a standard single-site install. You can turn on multisite later by adding WP_ALLOW_MULTISITE to wp-config.php and following the Network Setup screen.

Where are the MariaDB credentials for WordPress kept?

Log in over SSH; the message of the day lists the generated details for the image, and wp-config.php in the web root holds the values WordPress uses.

Can I host more than one WordPress site on one server?

Yes. Add a second Nginx server block, a second database and a second WordPress folder. A plan with 4 GB of RAM handles several small sites comfortably.

Does this image ship a hosting panel such as cPanel?

No panel is installed. You manage the site from the WordPress dashboard and the server over SSH, which keeps the full memory of the plan for the site.

Can I move an existing site onto this image?

Yes. Import with a migration plugin after the first install, or restore your own database dump and wp-content folder, then update the site address.

What is the cheapest plan that runs WordPress well?

P2 at $6.95 a month runs a cached blog in any city. In Europe, S4 gives twice the memory for $4.25.

Start a WordPress server

Choose WordPress on Ubuntu 24.04 when you create the server, or rebuild an existing one with it.