How to install WordPress on the local system?

In this post, we will see how we can install WordPress on our local system. It is better to install it on local first, because of that we will get an idea of the WordPress website. Since we just want to learn WordPress for now we can do it on a local machine rather than buying hosting and domain.

There are some prerequisites. You should have XAMPP installed on your computer. If you don’t have XAMPP installed on your system you can see the instructions to install it here. In XAMPP we need two services those are Apache(to display the site on browser) and MySql(to handle the site data). If you are getting errors related to port while starting those services you can refer to these posts.

You will get to see the XAMPP Control Panel as follows:

Now, we need to download WordPress from its official website. You can download it from here. Click on the Download WordPress button.

Now, you will get to see the .zip file, extract it. Get inside that extracted folder and copy that wordpress folder inside the XAMPP’s htdocs folder. Remember that the copied folder will contain the folders and files starting with “wp-“.

As you can see below I have placed the wordpress folder inside the htdocs folder. This htdocs folder exists inside the xampp folder. It lies in C drive or the location specified by you while installing XAMPP.

You can rename that folder to your desired website name. In that folder exists the default WordPress site.

Now, our Apache and MySQL services are running from XAMPP. Go to the browser and type localhost:8082, here my apache port number is 8082 hence I have written 8082. You will get to see the port number in front of the apache service in the XAMPP control panel. See the first image I have marked the apache port number in the red box. The default port is 8080 you can use it if there is no such port.

Now, on the place of the dashboard write the name of the folder you have given in htdocs and hit enter. So it will be like this localhost:8082/mywpsite.

You will get to see the above window select your desired language and click on continue.

Now we need to create a database to handle all the data of our site. We will use phpMyAdmin. Keep this tab as it is. In other tab type localhost:port_number/phpMyAdmin and you will get to see the phpMyAdmin dashboard like below. In that phpMyAdmin dashboard click on new to create a database. Enter a database name and click on create. You have created the database successfully if you are able to see the database name on the left. After that get back to the WordPress installation window click on the Let’s Go button.

Now, here we need to specify the database name, database username, database password. We will give the database name which we just created so in my case it will mywpsite, database username will be root and password will be blank. We are keeping username as root because we are using local database phpMyAdmin and its default username is root and password is blank. While hosting these values will be different. Don’t change the value of the Database host and Table Prefix. Click on submit.

After clicking on Submit you will get to see the Run the Installation button click on it to start the WordPress installation.

After clicking on the Run the installation button it will ask for Site information.

Here, I have kept Site Title as Codetej, username as codetej, password as admin. I have checked the Confirm use of a weak password since my password is weak. I have given an email. You need to remember the username and password since we will need them later. Now, remember I am on the local machine so I can use a weak password while if you are actually hosting your site you need to have a strong password. After doing this much, click on Install WordPress.

You will get to see the success message. Now click on Log In button.

You can click on Go to Codetej to see the default site. Or you can enter your username and password which we have given in the Information needed section and click on Log in. You will get to see the WordPress dashboard and here you can manage your site.

To see the site, in the new tab type localhost:port/folder_name.

So this is the default site and WordPress is installed on your system successfully.

Leave a Comment

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