How to Setup | Install a WordPress website in Linux painlessly

Let’s Setup | Install a WordPress website in Linux painlessly. WordPress is the most popular WebApp in the internet. It is a free and open-source content management system(CMS) based on PHP and MySQL. WordPress is designed for blogging. Most of the people are choosing WordPress for their blogs including me! because we can easily create a website using WordPress with no pain . Let me explain how we can do it here …

I assume you have a LAMP server ready to install WordPress on it. If you don’t, please learn how to setup a LAMP server from here >> 

Step1: Download WordPress:

Let’s download WordPress to our server using wget command. Latest version of WordPress is always available at


Downloading WordPress


From the message, you can see that WordPress is downloaded as a compressed file ‘latest.tar.gz’ to the current working directory.


Let’s extract the file:


Step2: Copy WordPress files to Document root:

You will see a directory called ‘wordpress’ is created in the current working directory. All WordPress files are located under this directory. We need to copy this files to the document root of Apache.  /var/www/html/ is the document root of my apache website. I am copying content of ‘WordPress’ directory to the document root using following command.


Let’s save some disk space by deleting ‘latest.tar.gz’ and ‘wordpress’ in the current directory.


To fix all permission and ownership issues in the document root, run following commands.



Now open your brand new WordPress website in the browser http://your_server_ipaddress and you should see something like this.


WordPress setup page


Step3: Create a Database and Database user for WordPress:

As I mentioned above, this is the WordPress setup page. During the setup process, you will be asked to type in the database details for your website. So Let’s create a Database and a user.

Log in to MySQL server as root.

and type in following DB queries



That’s it! A user ‘mydbuser‘ is created who has full access on db ‘mydb‘. Please remember to give a strong password for the user(not like what I given here).

Step4: Follow WordPress Installation instructions in the browser:

Once done, click on “Let’go” button on the browser and input details of newly created database. Then It should look like this.



Click ‘Submit’ button and then “Run the installation” button.



Next you get a page to input WordPress admin credentials. There give a strong password and proceed further.




That’s it. Now you can access your WordPress Website using https://your_server_ip_address and access the WordPress admin page with https://your_server_ip_address/wp-admin


WordPress admin page



WordPress main page



I hope you could follow my blog on WordPress installations. I will be filling this article with a lot useful information soon. Stay tuned by subscribing to the website.


Subscribe here

An automation enthusiast who presently working as Site Reliability Engineer with 4+ year experience in the field.
Posts created 7

Leave a Reply

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

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top