Family Encyclopedia >> Electronics

How to create a local WordPress site using XAMPP

Do you want to create a local WordPress site on your computer using XAMPP? Installing WordPress on your computer helps you test WordPress, test themes/plugins, and learn how to develop WordPress. In this article, we will show you how to create a local WordPress site with XAMPP.

How to create a local WordPress site using XAMPP

Why create a local WordPress site?

Creating local WordPress sites is a common practice among site developers and owners. It allows you to test WordPress without creating a real website on the Internet.

Local websites are only visible to you on your computer. You can try out different WordPress themes and plugins, test their features, and learn the basics of WordPress.

If you already have a WordPress website, you can create a local copy of your website on your computer to test new plugin updates before deploying them to your live website.

Important: The local website will only be visible to you on your computer. If you want to create a live WordPress site, you will need a domain name and a WordPress server. Follow the step-by-step instructions in our how to start a WordPress blog guide when you're ready to create a live website.

With that said, let's see how to install WordPress locally on Windows, Mac, or Linux using XAMPP.

What is XAMPP??

To create a local WordPress site, you will need to set up web server software (Apache), PHP, and MySQL on your computer.

PHP is a programming language and MySQL is database management software. Both are required to run WordPress.

Installing each of these programs separately is quite difficult for beginners. This is where XAMPP comes in.

XAMPP makes it easy for you to create WordPress websites locally. It is available for Windows, Mac and Linux based computers.

Let us begin.

Installing XAMPP on your computer

First, you need to visit the XAMPP website and click the download button for your operating system.

How to create a local WordPress site using XAMPP

Depending on your operating system, your installation wizard and application interface may differ from the screenshots here. For the sake of this article, we will show you the Windows version of the software.

After downloading XAMPP, you will need to click and run the installer.

How to create a local WordPress site using XAMPP

XAMPP will ask you where you want to install the software and which packages you would like to install. The default settings will work for most users. Keep clicking 'Next' to finish the setup wizard.

After finishing the wizard, check the 'start control panel now' option and then click the Finish button.

How to create a local WordPress site using XAMPP

This will launch the XAMPP control panel. Go ahead and click the start button next to Apache and MySQL.

How to create a local WordPress site using XAMPP

XAMPP will now start Apache and MySQL. You may see a Windows Firewall notification, it is important that you click the 'Allow Access' button for both applications to run on your computer.

How to create a local WordPress site using XAMPP

Once both apps are launched, their names will be highlighted in green.

You have successfully installed XAMPP on your computer.

You are now ready to create a local website and install WordPress using XAMPP.

Creating a local WordPress site with XAMPP

First, you will need to download WordPress. Visit the WordPress.org website and click the 'Download WordPress' button.

How to create a local WordPress site using XAMPP

After downloading WordPress, you should extract the zip file and you will see a wordpress binder. You need to copy this folder.

How to create a local WordPress site using XAMPP

Next, head over to your XAMPP installation folder.

On Windows it would be C: / Archivos de programa / XAMPP / htdocs or C: \ Xampp \ htdocs binder.

On Mac, it will be / Aplicaciones / XAMPP / htdocs binder.

Paste the wordpress folder you copied earlier into htdocs.

How to create a local WordPress site using XAMPP

We recommend renaming the wordpress folder to website1. This will help you easily identify your local site.

Next, you need to open your favorite web browser and visit localhost/website1. You will see a page like this:

How to create a local WordPress site using XAMPP

This page will tell you that WordPress needs a database name, database username, password, and host information.

We are going to create a database for your WordPress site.

You will need to open a new browser tab and visit localhost/phpmyadmin/. This will launch the phpMyAdmin application that comes pre-installed with XAMPP. It allows you to easily manage your databases using a simpler interface.

You will need to click Databases, provide a name for your new database, and then click the create button to continue.

How to create a local WordPress site using XAMPP

Now that you have created a database, you can use it for your WordPress site.

Go back to the /localhost/website1/browser tab and click the “Go” button.

On the next screen, you will be asked to provide information from your WordPress database.

Enter the name of the database you created earlier. Your username is 'root' and you must leave the password field blank. For the database host field, you need to use localhost.

See the screenshot below:

How to create a local WordPress site using XAMPP

Once you are done, click the 'Submit' button to continue.

If you're on Windows or Linux, WordPress will now store these settings in your WordPress configuration file called wp-config.php.

However, if you're on a Mac, it will show you the contents of the file and ask you to create it.

You will need to create this file in the root folder of your website.

After creating the file, paste the text you copied earlier into it. You must then save the file and return to the WordPress installer to continue.

In the next step, WordPress will ask you to provide information about your website. First, enter the title you want to use for this site.

After that, you need to enter a username, password and an email address for your administrator account.

How to create a local WordPress site using XAMPP

Once you have filled in all the information, click the 'Install WordPress' button to continue.

WordPress will now run the installation and prompt you to log in once it's done.

You can login to your website by going to / localhost / website1 / wp-admin page and use the username/password you entered during installation to log in.

How to create a local WordPress site using XAMPP

Things to try after creating a local WordPress site

Now that you have created your local WordPress site with XAMPP, you can work on it as you would on a live WordPress site.

Go to Appearance to customize the look of your site or install a new theme. Here are some great free themes that you can try.

The next thing you might want to try is WordPress plugins. Plugins are like apps for your WordPress site and allow you to add cool features like contact form, photo galleries, eCommerce store, etc.

Need help installing plugins? See our step-by-step guide on how to install a WordPress plugin.

After working on your local WordPress site, you may want to move it to a live server. Head over to our step-by-step guide on how to move WordPress from localhost to live site.

We hope this article has helped you learn how to create a local WordPress site with XAMPP. You may also want to look into alternative ways to create local WordPress sites on Windows with Wampserver and on Mac with MAMP.

If you enjoyed this article, please subscribe to our WordPress YouTube Channel video tutorials. You can also find us on Twitter and Facebook.