codedefined.io

How to make a Local WordPress Website Using XAMPP

January 8, 2023 No Comments

Introduction – WordPress Website Using XAMPP

Today, I’m going to talk about how to set up a local WordPress website using XAMPP. There are a number of ways you can learn how to create a website using XAMPP and WordPress. I’m going to try and make this the simplest way possible.

This should be very easy to follow along with and I will have images throughout to give a visual of what I am talking about.

If this is your first time using XAMPP for this purpose, then please read the article in full.

Before I get into how to set this all up, let me first explain why you should even bother in the first place.

XAMPP allows you to set up a local, offline instance of your WordPress site. This means you are able to make changes to your site and see the full effect they will have on everything before it goes live.

This is critical if you are hosting a site, particularly one that sees lots of users, as you want to minimize downtime as much as possible. Crashing your website because you made a silly HTML or CSS mistake when updating is not a good look!

XAMPP will help prevent this and give you confidence that any changes made to the live version of your site will work just fine.

So, let’s get into it.

Tutorial – WordPress Website Using XAMPP

What Exactly is XAMPP?

Just for some context, XAMPP is an open-source web server package developed by Apache.

It provides you with an Apache web server, MySQL database (MariaDB), Php, and Pearl.

It is also cross-platform meaning it works on Windows, Linux, and MAC.

Also, it’s completely FREE to use!

Where to Download XAMPP

XAMPP can be downloaded from this webpage. Choose the download relevant to the operating system you are using.

For the purpose of this tutorial, I’m going to explain the setup process for Windows, but it will be similar if not exactly the same on both MAC and Linux.

Installing XAMPP

When you hit download and run the installer, you will see something similar to this.

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

I like to keep these checked, even though I wouldn’t use Perl with my site, it’s always nice to have options and they don’t take up much space.

Hit Next and choose an installation folder. Follow all the steps on the screen until the installation has been completed.

You should now see a folder called “xampp” at the root level of your Local Disk.

Inside will be a number of other folders.

The one we are most concerned with is “htdocs”.

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

This is where we will place our WordPress download.

Installing WordPress

Now, we’re going to install WordPress and do the configuration.

If you already have a WordPress site, you can skip this step and simply copy and paste your site’s WordPress folder into the “htdocs” folder seen in the image above.

You can download the latest version of WordPress here.

Once done, extract the folder and place it into the “htdocs” folder. You can rename it whatever you like.

Now, we’re going to do the configuration for the WordPress instance.

Configuring WordPress

We need to set up some credentials so we can access the admin side of our site.

To start, we need to run XAMPP.

We can do this by running the xampp-control file in the XAMPP directory, or by typing in “XAMPP” in our windows search.

Once done, you will see this on the screen.

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

Click Start on both the Apache and MySQL rows.

Now, open up a web browser and navigate to http://localhost/<Name of your wordpress file>.

I’ve kept mine as simply “wordpress” for this tutorial, and here is my link and what you should see when you navigate to yours.

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

If you don’t see this, then you have done one of the previous steps wrong.

Hit continue and you will see this:

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

As stated here, you will need to retrieve some details from the wp-config-sample.php file located in the WordPress installation folder you downloaded earlier.

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

The bits we’re concerned with are below:

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

You need to change these files to line up with your own database credentials. You can see these credentials by navigating to localhost/PHPMyAdmin and clicking on User Accounts at the top of the screen.

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

You will see your credentials here where it says “localhost” with ALL PRIVILEGES and a Password set to No.

By default, the password is blank. You can set a new one by clicking on “Edit privileges” and then “change password”.

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

Once, you’ve got all that, use that information to fill out the wp-config-sample.php file and the WordPress webpage too.

Here’s mine:

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.
How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

This will create a wp-config.php file in that same directory.

 how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

You should now see this screen. Hit Run the installation.

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

Now, provide the following information on the next page:

  • Site title.
  • Username.
  • Email.

Also, save the password generated for you somewhere safe!

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

Once finished, hit “Install WordPress”.

Congratulations! You will now be able to log in to the WordPress admin screen with those credentials.

It should look something like this:

How to create a website using XAMPP and WordPress. how to create wordpress website using xampp. how to create a website using wordpress and xampp. WordPress Website Using XAMPP.

So, now what? We have a WordPress Website Using XAMPP!

Well, now you are able to fully make any changes to your site and see how it all looks locally without going live on the internet with it.

When you do what to go live, simply move the WordPress folder that we’ve been working on into the necessary place in your web server.

And from then on, you can just upload individual files as you make changes to them, safe in the knowledge that it won’t crash your site because you’ve seen it all locally before.

There are a number of tools you can utilize to do this file upload. WinSCP can be used if your server is hosted on a Windows machine. FileZilla is another option for Linux servers.

The best option I feel is AWS. everything on AWS is simpler and cheaper. You can check out some of my other blog posts on AWS for more details.

Conclusion – WordPress Website Using XAMPP

So, what have we done? We’ve learned how to create a website using XAMPP and WordPress. We’ve installed WordPress and configured XAMPP to allow us to run the WordPress instance locally on our own system.

This means we can freely make changes to our site and test them out before going live, giving you a sense of safety when it comes to making changes to your website.

If you’re interested in finding out how you can Setup a Secure WordPress Instance with AWS Lightsail, then check out my blog post on the topic.

AWS Lightsail is an extremely cheap and easy way to run a WordPress website, and you can use the same method I’ve explained in this article to test the site locally before going live!

I guarantee your cost to run a site on this will be cheaper than most other providers and with the help of other AWS services, you can make your site very fast. It just takes a few clicks of a button to set up.

So, go on, go for it!

Leave a Comment!

Leave a Reply

Your email address will not be published.