WordPress is the most popular web platform as it powers more than 30% of the world’s websites. In this post you will get guideline of how to install WordPress on local host. If you’re building or developing a website, you may need a local site. A local WordPress website is an offline version of a regular website. It allows you to create content and test themes, plugins, and add-ons as you would in the regular one from the convenience of your computer. If you like the local site, you can upload it and use it on the live site.
Away from the eyes of your users and visitors, you can create your site at a comfortable pace. If you’re new on WordPress, it will help to familiarize yourself with WordPress. However, we understand that you might not know how to install WordPress on Localhost. All you have to do to own a local website is to follow the instructions we’ve outlined herein.
Choosing and Installing a Localhost
There are several options when it comes to selecting your localhost, including WAMP, LAMP, MAMP, and XAMPP. They are created to support different operating systems. However, in this tutorial, we will focus on XAMPP, which supports all the major popular operating systems such as Linux, Mac-OS, and Windows.
- Visit the XAMPP official website to download the software. You will need to select your operating system before downloading it. The files are more than 100mb, so the download process may take a while. The files will arrive on your computer inside a zip folder. Unzip it and select the installation option.
Open to run the file you downloaded, and your system will prompt the XAMPP installer to run on your computer. You might get a message informing you that the antivirus you have may interfere with the installation of the software. Click yes on this prompt to proceed.
Your operating system configuration may prompt another warning about User Account Control. Click to continue through this one too.
- After these prompts, the XAMPP setup wizard will start guiding you to install the software in a window like the one below. Click next to continue.
- This action will bring you a window, such as the one we have below. Note that the software has already selected all the components.
- However, you don’t need all of them. Unselect the boxes and leave your window with the only selected fields as Apache, MySQL, PHP, and phpMyAdmin. Click on next.
- The next window will require you to select a folder in which you’ll install XAMPP. If possible, leave it as the default destination, as shown in the screen below. Click next to continue.
- The next page will introduce you to Bitnami. You can ignore this one or uncheck the box that would have you install Bitnami. You can do this because you don’t need the software to install WordPress on localhost. Click on next.
- The next window will notify you that the setup is complete, and XAMPP is ready to install. Click on next to continue.
- The automatic installation process will now start. It may take several minutes, so be patient. Once it is through, check the box that asks you to start the control panel now then click on the finish button.
- The process of installing WordPress on localhost requires two modules only; Apache and MySQL. In the actions column, click on start on the buttons adjacent to both Apache and MySQL. At first, both modules may have yellow highlights, but once they start, they’ll take on green highlights.
- Now, you can open your browser and search for http://localhost/. If your local server is up and running, it will show you a window such as the one below.
Downloading WordPress Files
- When you get this window, all that is left is to install a WordPress site on XAMPP. You’ll need to go to the WordPress official website to download an updated version of WordPress. Click on the get WordPress button and select the download WordPress option. The files will come to your computer in a zip folder.
- Back in your computer, find the XAMPP directory (in my case it is C://xampp). Locate a folder labeled htdocs. In this subfolder, create a new folder for your local site. If you name it mylocalsite, your local site will be accessible via the link http://localhost/mylocalsite.
- Do you remember the WordPress files that came in a zip folder? Extract them into the folder you just created.
Install WordPress on Localhost
- For this step, you will have to create a database for your WordPress installation in MySQL. Open PHPMyAdmin from the XAMPP control panel. Click on the admin button beside the MySQL module.
- This action will lead you to a page on your browser, such as the one below. Click on databases.
- On the following slots, enter a name for your database. Choose any name you like, but make sure you can remember it easily. Click on create. You don’t need to create a database user, as you would have to do when installing WordPress on a live web server.
Install a Local WordPress Version
- Remember that we mentioned that you’ll access your local site via a link in the form of http://localhost/thesitenameyouchose. In my case, that is http://localhost/mylocalsite. Search the link on your browser. You’ll be introduced to the normal WordPress installer. Click on the let’s go button.
- The next window will require you to fill out your database name, username, password, database host, and table prefix. Finish everything normally, but leave your password blank and use the username root. The database name should be the same as the one you created in PHPMyAdmin. Click on submit.
- The next window will ask you to run the installation.
- The next window needs you to fill out the information concerning your site. The installer will automatically generate a password for you. Once you’ve filled in the required information, click on the Install WordPress option.
- The next window will proclaim your success and ask you to log in.
- In the next window, fill out the password you allowed the installer to generate along with the username, root.
- The window that appears next will give you access to an admin’s dashboard for your local site.
You now know how to install WordPress on localhost. You can now tweak your site as much as you want away from the prying eyes of the internet. You can create content and publish it locally as you experiment and figure out the best modifications that you can make for your live site. Good luck, and enjoy yourself.