Last Updated on July 23, 2021
If you run a WordPress website, then there’s a chance you’ve experienced occasions when your website went down – because of a plugin or theme update, or you got hacked, or maybe you just adjusted something in your settings. Installing WordPress locally is a great way to future proof your WordPress website and prevent it from going down.
This guide will teach you how to run WordPress locally. Your local website can be your platform where you can set up different types of environments that will allow you to test whether your site works well or not – without the risk of your live site breaking down.
There are various ways you could do this. You could have a staging site for you to run different tests, or you could install WordPress locally into your computer. Each way has its own merits of course, but for this guide, let’s dive deep into why installing WordPress locally on your own computer is a good option.
Why You Should Install WordPress Locally
- It’s a safe way to test WordPress core, third party plugins, and theme updates to test for breaking changes. You won’t have to manually fix the issue on your live website or restore it from an earlier backup. You can easily find the issue on your local host and push it to your live website.
- Since your site is hosted on your computer, you won’t be relying on an internet connection to access your environment. This allows you to work on your website and/or find and fix issues faster.
- It’s free! You won’t need a web host or possibly pay an additional fee for a staging site.
Comparing Local WordPress Development Tools
There are a lot of tools that you can choose from. It’s easy to get a bit confused on which one may be the tool for you. To make it easier for you, here is a comparison of three commonly used development tools:
XAMPP is a free open source platform and supports major operating systems (i.e. Windows, MacOS, Linux). XAMPP stands for X-platform Apache MariaDB, PHP and Perl. It stacks all the programming languages and databases that you need to set up your WordPress environment.
- Free and open source
- VM-based local WordPress experience for MacOS users
- Allows for setting up a software stack including Apache, MariaDB, Perl, and PHP
- Easy-to-use dashboard where you can manage your WordPress website
If you’re interested in installing WordPress locally using XAMPP, check out this article from WP Beginner.
MAMP stands for My Apache, MySQL, and PHP. It is a free platform with a pro version for those who’d like additional functionality. MAMP PRO for Mac is actually the only version that has a built-in WordPress publisher, importer, and server migration.
- Allows for setting up a software stack including Apache, MySQL, and PHP
- Easy installation with option to set up custom environment
Learn about how to install WordPress locally using MAMP in this article by Themeisle.
3. Local by Flywheel
Local by Flywheel is a free platform that’s built exclusively for WordPress development. Though the free version is already jam packed with everything you need for WordPress development, it also offers additional functionality for a fee.
- One-click WordPress installation
- Easy-to-use and intuitive interface
- Easy installation with option to set up custom environment
- Includes programming language and databases needed for WordPress
How to Install WordPress Locally using Local by Flywheel
At Stackable, we actually use Local by Flywheel to develop our plugin. We also use this for sandbox websites where our designers and writers create tutorials and test new features and development.
We’d like to show you how you can install WordPress locally using Local by Flywheel. The installation process is generally the same for both Windows and MacOS, so it won’t be too difficult to follow along.
Let’s get to it!
Downloading Local by Flywheel
- Go to https://localwp.com/ and click Download on the menu bar. Fill up the form then your download should begin afterwards.
- Once your download finishes, open the .exe file for Windows or .dmg file for MacOS. Follow the instructions for the complete installation of the program.
Creating a new site
- Once you open the program, you have the option to create a new site. Click the Create New Site button.
- Give your new site a name. Click Continue.
- Select the environment you prefer, just pick Preferred to quickly get started. For advanced users, you can also customize your PHP version, the type of Web Server to use – nginx or Apache, and your MySQL version. You can adjust these settings later as well.
- Enter a username, password and email address for your login credentials. Click on Add Site.
- Once the initialization is complete, you will have created a new site locally on your computer! To visit your local website in your browser, click on the Open Site button, or you can visit your site by using the name with a
.localin the end. For example, ours was
What Can you do with your Local WordPress Website?
Now with your WordPress website available locally, what can you do with it?
Well if you have an existing WordPress website, you can import an existing website into Local, and make all your developments locally. This can be done by downloading a zip file of your WordPress site manually from your website host. To make things easier, you can use a third party plugin like Backup Buddy Pro. You can also do this in the other direction, to export your website into your live website.
You can also share your local WordPress website online by turning on Local’s very useful Live Link feature. Turning it on would create a temporary url that looks like this:
abcdef1.ngrok.io that you can share with others. This is very helpful if you’re building a website for a client and you want to share your progress.
If you’re a FlyWheel customer, you can use the new site you created as a staging site where you can build your WordPress website from scratch. You can push this new site to a live website by connecting a host and adding a live link.
Quick recap on installing WordPress locally on your own computer
By installing WordPress locally on your own computer, you are given the ability to make various changes to your site like testing themes and plugin compatibility without the risk of breaking your live website.
There are various methods on how you can set up your local WordPress environment, like XAMPP, MAMP, and Local by Flywheel. In this article, we taught you how you can do it using Local by Flywheel.
Let us know if you tried installing WordPress locally in the comments below. If you have any suggestions or questions, don’t hesitate to reach out to us!