Installing WordPress on Linux

Posted OnNov 22, 2013     CategoryInstalling WordPress     CommentsNo comment

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

sudo -i

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

finalizing ubuntu wordpress installation

Fill in the details and that’s it, you’re done and have successfully installed WordPress on Linux through the command line!

Leave a Reply

Your email address will not be published. Required fields are marked *

Send this to friend