WordPress is the most popular platform that powers over one-third of the entire website on the web. To start using it to test building a live site doesn’t necessarily require buying a domain name and hosting. You can run WordPress on your local computer (host) with an App. Whether you want to learn or build your business site with the CMS (content management system), Localhost WordPress is the “Go-to” before moving your website to a live server.
How to Create a WordPress Localhost Site?
Any site hosting done on Localhost isn’t accessible to web users. The provision of the environment for a WordPress Localhost is achievable only with a Local Application. All testing for issues or qualities concerning a site before making a visual appearance on the internet is better off with the WordPress site Localhost.
The localhost Apps are also known as localhost service providers that would enable you to create the database for your site through their servers. Some of the popular ones available are LAMP, MAMP, WAMP and XAMPP. As a software, they happen to have the same way of installing WordPress sites locally by utilizing the Apache, PHP, and MySQL web server.
In outlining the process of going about hosting a site locally, the XAMPP is exemplary here. The XAMPP is an open-source App (just as others) but, it is compatible with all operating systems (cross-platform) like Windows, Linux, and Mac-OS. Here is how to go about creating a WordPress site on Localhost withXAMPP.
Download XAMPP on a Computer
Visit the official website ofXAMPP and click on the download button for the particular operating system you are using. The executable file starts downloading, and once done, kindly click on the file to start the installation.
Install and RunXAMPP
On loading the installer, the wizard brings out a warning to allow the application to make changes to your PC, choose the “Yes” button. The setup dashboard opens up, click on “Next” button.
Choose the components you do be needing alongside theXAMPP, most importantly check the Apache, MySQL, and phpMyAdmin. Then, click the “Next” button.
Select the folder for housing or storing theXAMPP program, and click on the “Next” button.
Pick the language for the application, and click on “Next” button.
You can uncheck the learn more about Bitnami forXAMPP if you know how it works, and click on the “Next” button.
Click on the “Next” button to allow for installation ofXAMPP on your computer properly.
Allow for the installer to unpack its files and click on “Next” button once done.
Finally, click on the “Finish” button to bring theXAMPP setup wizard to completion.
Furthermore, click on “Allow access” when your OS defender firewall or antivirus blocks some features of the app.
Note: We are using the Windows OS version to walk you through the process.
Download Latest WordPress Version
Head over to the WordPress organization official website to download the latest version of WordPress.
On completion of the download, locate the zip file in the download folder of your computer. Unzip (extract) the WordPress file and copy its folder.
Move WordPress Folder Into htdocs Folder
Locate and click on theXAMPP installation folder in your local disk. Then, select the “htdocs” folder and paste the WordPress folder into it.
The htdocs folder serves as a host to save all your local website data. Now, rename the WordPress folder to any other name for easy identification (using “mysite” here).
Create a WordPress Database
Open theXAMPP application and click on the “Start” button actions for the “Apache” server and the “MySQL” database, respectively.
Click on the “Allow access” button if the windows firewall notification shows up again.
Now, open a new tab in your favourite web browser, type in the “localhost/phpmyadmin” URL and press the enter key to load the page. With the interface that appears, select the “Databases” menu, enter a database name and click on the “Create” button to set up your database.
Then, here comes the time to run the WordPress installation for your website.
Run WordPress Site Installation on Localhost
Open another tab in the web browser and type in “localhost/mysite” (for yours, after the /, use your given renamed WordPress folder earlier). On pressing the enter key, the WordPress setup wizard appears, providing you with an option to choose a language for your site.
After selection, click on the “Continue” button and the “Let’s go” button for the (welcome notice) next page that comes up.
You would be filling in the name of the database to use, username, password, host and table prefix as details for your database connection. Provide the database name (mysite) created beforehand, input a username like “root”, can leave the password blank, the host should be “localhost” and table prefix as it is, shown below.
Hit the “submit” button and click the “Run the installation” button to complete the installation.
Then, there is a requirement to fill in information for your website proper. Enter your site name, then the username, password and email address for the admin login details of your dashboard. Ensure you are using a strong password, and you can discourage search engines from indexing your site yet since you aren’t going live. On filling in every detail, click the “Install WordPress” button to conclude the installation.
You will get a success notice with a prompt requiring you to click on the “Log in” button. Also, you can desire to use localhost/mysite/wp-admin (remember to replace mysite with the name of your renamed WordPress file) to access your admin panel always.
Now use the username and password you pre-filled during installation to log in.
Explore WordPress Website
Ensure that everything is working and looking as you will from your dashboard (front-end and backend).
The front-end requires using the localhost/mysite to view as below image shows, unlike the backend that uses login details (above image).
You can choose to create new pages, add posts, install and activate themes or plugins with so much more setups.
After all workings or setting up of your local WordPress site is time to move it to a live server for visibility on the internet. It only requires getting a domain name and web hosting to achieve that. Also, other local apps follow the above steps to set up a localhost WordPress site.