how to install LAMP and WORDPRESS in UBUNTU

0 min read

In this tutorial, I'll show you how to install and configure LAMP (Linux, Apache, MySQL, PHP) on Ubuntu, and then how to install WordPress.

Please note that you'll need administrator privileges (sudo access) to perform these operations. You can use sudo before each command, or switch to a root shell temporarily with sudo -i.

Installing LAMP Stack

The recommended way to install LAMP on Ubuntu is using the system package manager. This ensures you get the latest stable versions and proper security updates.

First, update your package list:

sudo apt update

Install Apache web server:

sudo apt install apache2

Install MySQL database server:

sudo apt install mysql-server

Install PHP and required extensions:

sudo apt install php libapache2-mod-php php-mysql

After installation, you can verify Apache is running by visiting http://localhost in your web browser.

Installing WordPress

Download the latest version of WordPress:

Download WordPress: https://wordpress.org/latest.zip

Or use wget to download directly:

cd /tmp && wget https://wordpress.org/latest.zip

Extract the archive and move it to your web directory:

unzip latest.zip

sudo mv wordpress /var/www/html/

Set proper permissions:

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

You can then access WordPress through your web browser at http://localhost/wordpress and follow the installation wizard.

Note: This tutorial covers the modern method using system packages. If you prefer using XAMPP (which bundles Apache, MySQL, and PHP together), you can download it from Apache Friends, though the package manager method is recommended for production use.

[youtube=https://www.youtube.com/watch?v=g3GYyAvxxWY]



  • Home
  • About