How To Install WordPress Locally With MySQL

Affiliate disclosure: In full transparency – some of the links on our website are affiliate links, if you use them to make a purchase we will earn a commission at no additional cost for you (none whatsoever!).

WordPress is the best platform for creating and running websites. I’ve been using it for almost a year now and completely love this platform!

For anyone, whether it’s a novice or an expert, WordPress is the only platform I would ever recommend! The reason I love WordPress so much is its easy installation, easy navigation and being its feature rich.

WordPress offers beautiful free themes in bulks, and a lot more features are there on the WordPress, which are too easy to get! WordPress offers thousands of free plugins which are far more than any other platforms could offer.

In WordPress, you don’t need to go for anything manually. For instance, if you need a contact form on your WordPress, no need to go into coding. There are many WordPress contact form plugins which you can install on your WordPress and build designer contact forms within minutes.

Similarly, there are plugins for several other features which helps you add additional features to your WordPress website. WordPress has a plugin for almost everything you can think of! From WordPress login to how to use WordPress, everything is damn easy.

Even installing WordPress is itself a task of hardly a couple of minutes. That’s the reason; we have over millions of users of WordPress and the number is rapidly increasing.

If you are a novice and don’t know much about WordPress installation, then you are on the right page. Today, I have compiled a guide on how to install WordPress locally with MySQL.

Albeit, WordPress takes hardly two minutes to get installed if you go for the quick installation, but in case that method doesn’t work out for you, here’s the solution. This guide covers the method for installation of WordPress manually.

So, shall we start??

How To Install WordPress Locally With MySQL

I am assuming that you have basic information about how a website works. You should know that to install WordPress; you should have a hosting account.

There are countless hosting providers like Bluehost, Hostgator, site ground, Dreamhost, etc. To run a website or a blog with WordPress, you need to have an account on one of the hosting providers. Along with this, what are the other pre-requisites you would require to installing the WordPress manually, have a look!

  1. Since we are manually installing the WordPress, we need to create MySQL database and user. For this, you’ll require cPanel credentials to log in to the cPanel area. 
  2. FTP access to your hosting account. In my case, it’s Hostgator.

These are the only things you need to have, rest of the procedure I’ve mentioned below in the guide! The guide is compiled in the five steps. Let’s have a look.

Step 1. Download the WordPress  

The first step is to download the latest version of WordPress on your computer. For this, go to the official website of WordPress and install the WordPress package on your computer.

Navigate through it, right-click on it and extract or unzip the zip file in the new folder.

Step 2. Upload WordPress to the Hosting account. 

Once we have WordPress downloaded, its time to upload on the server. There are three different ways you can do this. First one is by FTP upload; second way go through the file manager, and third way is uploading it by SSH.

You don’t need to go into the details of all three of these. We will follow here the second method i.e. via File Manager. In order to do that, you need to login to your hosting account. Once done, follow the below steps.

  • Go to cPanel.
  • Scroll all the way down to Files. Now under Files, click on File Manager.


  • You’ll be prompted with File Manager directory selection. Select Web Root(public_html/www) and check Show Hidden Files, and then click Go.


  • Now click on Upload and navigate through the file you downloaded in step 1 and extract it.

Step 3. Create MySQL Database and User

Now the step involves the creation of Database and user. Let’s see how to do it.

  • Go back to the cPanel again.
  • Under Database, click on the MySQL Database Wizard.


  • As sooner you do this, you will be required to enter the name of the database. Enter here any name which you can remember for the future and click on Next.


  • In the next step, you need to create the user of your newly created database. Enter the database user name and password and click Create User.


  • Once done, you need to assign privileges to the user. Select ALL PRIVILEGES and go to the Next Step.
  • Now note down all the details since you’ll require them in the next Step.

Step 4. Configure wp-config.php and Run the installation

Now you need to do some wp-config.php configuration. It’s an important step and needs to be done very carefully. Here’s what to do.

  • Login to cPanel> Files> File Manager.
  • Now select the directory Web Root(public_html/www) and check Show Hidden Files, then click on Go.
  • Now on the public_html directory, you’ll see a file named wp-config-sample.php. Right-click on it, select Rename and change the file name to wp-config.php. 


  • Once done successfully, right-click again on the file wp-config.php and select Code Edit. 
  • You’ll see the following code.


define('DB_NAME', 'database_name_here');
/** MySQL database username */ define('DB_USER', 'username_here');
/** MySQL database password */ define('DB_PASSWORD', 'password_here');

Now replace database_name_here, username_here,  password_here to your database name, username and password which you created in step 3.

  • Once done, click on the Save Changes button.
  • Now open a new tab in your browser and type the URL- (replace your domain name with the domain name of your website). You’ll see a page saying “Welcome to the famous five minute WordPress installation process!”.

Step 5. Complete the Installation

Till the above steps, we have reached to the quick installation process. Rest of process is going to take hardly 2 minutes.

  • First of all, select the language of your website i.e. English or the language you want your website to be in.
  • Now next and the last step is to fill the required information like your Site name, username, password, email address, etc.
  • Once done, click on  Install Now button.
  • That’s it. As sooner you click on Install now button, you’ll see a success message, and your blog will be up and running.

I hope you learned everything about how to install WordPress! I suppose the guide will be useful to you. For any queries or doubts, feel free to comment!


A graduate of the IIMC, Diksha enjoys testing out new tech products and services. Her goal is to help others make more informed purchases of tech products and services. In her spare time, she enjoys traveling, watching movies, and listening to music. An ardent reader loves to be surrounded by technology.

Leave a Comment