logo
. . .

How to Install WordPress with LAMP Stack on Ubuntu

Prerequisites:

a.Ubuntu 22.04 LTS VPS Server
a. Root or non-root user with Sudo privileges

1. Update Packages:

Open a terminal and run the following commands to update your server:
#sudo apt update
#sudo apt upgrade

2. LAMP Stack:

Install the LAMP stack (Linux, Apache, MySQL, PHP):
#sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql
During the MySQL installation, set a strong root password and remember it.

3. Additional PHP Extensions:

Install some additional PHP extensions required by WordPress:
#sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-zip

4. Install WordPress:

Download and Extract WordPress:
Download the latest version of WordPress:
#wget https://wordpress.org/latest.tar.gz
Extract the archive:
#tar -zxvf latest.tar.gz

5. Move WordPress Files:

Move the WordPress files to the Apache document root directory:
sudo mv wordpress/* /var/www/html/
Set the correct permissions:
sudo chown -R www-data:www-data /var/www/html/

6. Configure WordPress:

Rename the sample configuration file:
sudo cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
Open the configuration file for editing:
sudo nano /var/www/html/wp-config.php
Update the database settings with the MySQL credentials you created earlier.

7. Enable Apache Rewrite Module:

#sudo a2enmod rewrite
Restart Apache:
#sudo systemctl restart apache2

8. Complete Installation:

Open your web browser and navigate to your server’s IP address or domain.
Follow the WordPress installation wizard, providing the necessary information.
Once the installation is complete, log in to your WordPress dashboard.
That’s it! You have successfully installed WordPress on Ubuntu using the LAMP stack.

The advanced hosting product offers the most competitive pricing while ensuring reliable and fast server performance,cloud server india, best cloud hosting in india, cheap cloud hosting india,cloud server cost in india,cloud server price in india,cloud server providers in india,cloud hosting price in,india with comprehensive 24/7 technical support.