๐Ÿš€ Full Installation Guide โ€” WordPress on Ubuntu 24.04

Perfect โ€” installing WordPress on a Linux server without a hosting panel (like cPanel or Plesk) is a clean, manual setup. Here’s a detailed guide tailored just for that: Linux + Apache + MySQL + PHP + WordPress, 100% terminal-based.

๐Ÿงฑ STEP-BY-STEP GUIDE

๐Ÿ“ฆ 1. Update the Server

sudo apt update && sudo apt upgrade -y

๐Ÿ”ฅ 2. Install Apache Web Server

sudo apt install apache2 -y
sudo systemctl enable apache2
sudo systemctl start apache2

Check with:

http://your-server-ip

๐Ÿฌ 3. Install MySQL

sudo apt install mysql-server -y
sudo mysql_secure_installation

Create WordPress DB & user:

sudo mysql -u root -p

SQL

CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

โš™๏ธ 4. Install PHP 8.3 and Extensions

Ubuntu 24.04 comes with PHP 8.3 by default:

sudo apt install php libapache2-mod-php php-mysql php-cli php-curl php-gd php-mbstring php-xml php-xmlrpc php-zip php-soap -y

Restart Apache:

sudo systemctl restart apache2

๐ŸŒ 5. Download WordPress

cd /tmp
wget https://wordpress.org/latest.tar.gz
tar -xvzf latest.tar.gz
sudo mv wordpress /var/www/html/wordpress

Set permissions:

sudo chown -R www-data:www-data /var/www/html/wordpress
sudo chmod -R 755 /var/www/html/wordpress

๐ŸŒ 6. Create Apache Virtual Host (Optional: for domain use)

sudo nano /etc/apache2/sites-available/wordpress.conf

Paste this (replace with your domain if you have one):

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/html/wordpress
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com

    <Directory /var/www/html/wordpress>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/wordpress_error.log
    CustomLog ${APACHE_LOG_DIR}/wordpress_access.log combined
</VirtualHost>

Enable site & rewrite module:

sudo a2ensite wordpress.conf
sudo a2enmod rewrite
sudo systemctl reload apache2

๐Ÿ” 7. (Optional) Enable Free SSL with Let’s Encrypt

sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d yourdomain.com -d www.yourdomain.com

๐Ÿงช 8. Run WordPress Setup in Browser

http://yourdomain.com

Or:

http://your-server-ip/wordpress

Follow the installer:

  • Language
  • DB info (wordpresswpuserStrongPassword123!)
  • Site name, admin user/password

โœ… Done!

Your WordPress site is ready on Ubuntu 24.04! ๐ŸŽ‰

Contact Form Demo

Contact me

I am here to help! If you have questions, need support, want to learn more about my services, feel free to contact me.