After installing a complete localhost by using xampp, now we can proceed to install WordPress on localhost to create a website on your virtual host network.
Before installing, you should create a separate folder in the “C: \ xampp \ htdocs” folder for easy management, you can add virtual domain names if you like.
Install wordpress locally using xampp
Download the source code from the WordPress.org website
First, download the latest version of WordPress source code at https://wordpress.org/latest.zip.
After you unzip it, you will get a folder called “wordpress”. Maybe this wordpress folder will be nested in another folder named wordpress-x (x here is the version number), but generally you go on to get a wordpress name folder as shown below.
Next, go to the wordpress directory, you will see there are some folders named wp-admin, wp-includes, wp-content and some files named index.php, wp-config-sample.php , … All these files and directories, we call it WordPress source code.
Copy the WordPress source code to Xampp
Now, copy the entire file and folder to your website directory in localhost (for example, C: \ xampp \ htdocs \ designthing). This means that you only copy the files and the source directory, not the wordpress folder as we need to install WordPress on the domain http: // localhost / designthing, if you copy the wordpress directory, your website will The link is http: // localhost / designthing / wordpress /.
Create a new database
To run WordPress, your localhost must have a database using MySQL so that it can store soft data into it as posts, settings, … on the website.
How to create a database on localhost I had detailed instructions here, you can go to see.
Run the website to install
After the copy is complete, open the XAMPP control panel and launch Apache and MySQL. Then access the website with the link http://localhost/designthing
At this point, it will display the language selection menu to install for WordPress, select English (or other language that you prefer) and press Continue.
In the next step, it will remind you not to proceed with changing the wp-config-sample.php file to wp-config.php and declare the database information into it. Let Let’s Go let it do it for you.
And now enter the database information ..
Always remember that on localhost, the database’s User Name is always root, the password is blank (there is a way to set it but is not needed) and the Database Host is always localhost.
Table Prefix means that the database prefix contains WordPress data, by default it will be wp_, we can change it to anything but must have _ behind.
When finished entering the database information, click Submit button to do the next step. If the next step appears as shown below, it means that you have entered the correct database information, press the Run the install button to start the installation.
In this installation step, you will need to set up important information for the website such as the name of the website, the admin account name and password, … Enter the button and press Install WordPress.
And if it says Success! like this, you have successfully installed, click on the Log in button to log in to the WordPress admin panel.
And this is the admin page interface of WordPress.
And here, I need you to understand that, if you access the main domain name like http://localhost/designthing, it will go to the homepage of WordPress website like this.
If you want to access WordPress admin page, you will add /wp-admin to the link to http://localhost/designthing/wp-admin.
In this article, you learned how to install a WordPress site on the localhost environment is very detailed, and I believe you will do it. Keep reading the following articles to learn how to use and administer WordPress.