Web ApplicationsBeginner20 min

How to Install WordPress on Your Server

Complete WordPress installation guide with Apache, MySQL, and SSL configuration

Introduction

WordPress powers over 40% of all websites. This guide covers installing WordPress with Apache and MySQL.

Step 1: Install LAMP Stack

Install Apache, MySQL, and PHP required for WordPress.

sudo apt update
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip

Step 2: Create Database

Create a MySQL database and user for WordPress.

sudo mysql
CREATE DATABASE wordpress;
CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 3: Download WordPress

Download and extract the latest WordPress release.

cd /tmp
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
sudo cp -r wordpress/* /var/www/html/

Step 4: Configure WordPress

Set up WordPress configuration file with database credentials.

cd /var/www/html
sudo cp wp-config-sample.php wp-config.php
sudo nano wp-config.php
# Update database credentials

Step 5: Set Permissions

Set proper file permissions for WordPress.

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

Step 6: Complete Installation

Access your domain in a browser and complete the WordPress installation wizard.

Conclusion

WordPress is now installed and ready to use. Consider installing an SSL certificate and security plugins.

#WordPress#CMS#PHP#MySQL#Apache

Need Help?

If you encounter any issues following this tutorial, our support team is here to help 24/7.