How to Install WordPress with Caddy on Ubuntu 24.04

Caddy is an open-source web server designed for simplicity and automation. Built with Go, Caddy offers attractive features, including built-in support for HTTPS via Let’s Encrypt, automatic certificate management, and simple configuration. Thanks to these features, Caddy has become an ideal choice for developers who need a quick and reliable solution for serving websites or applications.

Install MariaDB

Install MariaDB:

Login to MariaDB:

Create a database for WordPress:

Install PHP

Install PHP 8.3:

Open the PHP-FPM pool configuration file:

Adjust the following configuration:

Restart the PHP-FPM service:

Install WordPress

Install WP-CLI:

Create a directory for the domain aminlabs.my.id:

Download the WordPress core:

Create the wp-config.php:

Install WordPress:

Change the directory ownership:

Install Caddy

Add the GPG key, repository, and install Caddy:

Open the Caddyfile configuration file:

Delete its contents, then enter the configuration for aminlabs.my.id and PHP-FPM:

Validate the configuration:

If there are warning messages:

run the following command:

Restart the Caddy service:

Testing

Finally, test the installation and configuration by accessing the domain aminlabs.my.id.

  • The WordPress website should appear and the HTTPS protocol should be active.
  • Log in to the dashboard, test installing and deleting themes.
  • Change the permalink to test the URL rewrite.

If you found this article helpful and would like to support my work, consider making a donation through PayPal. Your support helps me continue creating useful content and tutorials. Thank you!

Donate via PayPal: https://paypal.me/musaamin

Leave a Reply

Your email address will not be published. Required fields are marked *