Installing WordPress on Linux
In this tutorial we’ll demonstrate how you can install WordPress on a computer running a Linux distribution. For this, you will need root access and will ideally have a degree of familiarity with the command line.
We are also assuming that you do not have Apache, PHP, or MySQL installed, and will cover this accordingly.
Step 1) Open a Terminal window (control + alt + t) and run the following command
This will put your terminal session into super user mode and prevents us from needing to type sudo henceforth.
Step 2) Update your installed packages and install the LAMP Stack with the following command.
apt-get update && apt-get upgrage && apt-get install lamp-stack^
This will update your system and install the required software. During this process you can expect to be prompted to enter a MySQL password for the ‘root’ user.
Step 3) Install WordPress by running the following command
sudo apt-get install wordpress
This will install WordPress to the /usr/share/wordpress directory.
Step 4) Create a Symbolic Link so that Apache knows where to look for WordPress
sudo ln -s /usr/share/wordpress /var/www/wordpress
Step 5) Setup the database for WordPress with the conveniently supplied script with the following command
sudo gzip -d /usr/share/doc/wordpress/examples/setup-mysql.gz && sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost
Step 6) In your browser, open http://localhost/wordpress, and complete the installation
Fill in the details and that’s it, you’re done and have successfully installed WordPress on Linux through the command line!