How to setup WordPress on localhost
Installing WordPress locally on your computer is an excellent approach for developing and testing websites before they go live. One of the easiest and most efficient ways to do this is by using Local by Flywheel, a free application designed specifically for managing local WordPress sites. This guide will walk you through the process of installing WordPress locally using Local by Flywheel.
Why Local by Flywheel
- Easy Setup: Quickly launch new WordPress sites with just a few clicks.
- Work Offline: Develop and test sites without needing an internet connection.
- One-Click WordPress: Effortlessly install WordPress, bypassing manual setup.
- Live Link: Share your local site with others via a temporary URL for feedback.
- Email Testing: Test email functionalities without sending real emails using MailHog.
- SSL Support: Easily add SSL to local sites for secure development.
- Direct Access: Modify site files and databases directly and conveniently.
- Flexible Environments: Choose different versions of PHP, MySQL, and your web server per site.
- Site Cloning: Duplicate sites easily for testing or new projects.
- Host Integration: Seamlessly push or pull sites to or from WP Engine and Flywheel hosting.
How to setup WordPress on localhost in 6 Easy Steps
Step 1: Download and Install Local
- Visit the Official Website & Download the Application: Go to the Local by Flywheel website (now simply called “Local”) at localwp.com
- Click on the download button on the site.
- You might need to fill out a form or choose your operating system (Windows, macOS, or Linux) to get the correct version.
Install the Application: Once the download is complete, run the installer and follow the on-screen instructions to install Local on your computer.
Step 2: Create a free account
Step 3: Create a New Site
Click on the ‘Create a New Site’ button.
Local lets you start your site in two ways:
- Create a new site option. This means you start with a basic WordPress site and add your own themes, plugins, and settings later.
- Create from a Blueprint. This is like a ready-made site that already has themes, plugins, and other things set up for you.
Step 4: Name Your Site
Enter a name for your local site. This name will be used to create a local domain (for example, Yoursite.local).
Clicking on “Advanced options” reveals that Local automatically generates two elements:
- A domain name for your local site, comprising your site’s name followed by the extension .local. For example, in my case, it produces: my-site.local.
- The directory where your site will be stored on your computer (Local site path).
You have the option to retain the default settings or modify the domain name and location as needed. Once you’re finished, simply click on the green “Continue” button.
Step 5: Choose an environment for your local WordPress site
It’s time to configure the environment for your upcoming local WordPress site. Local provides a pre-configured environment in the “Preferred” box to assist you.
Alternatively, if you wish to select a custom environment, simply click on “Custom.” From there, you can make the following choices:
- Your PHP version, which powers WordPress
- The web server type (NGINX or Apache)
- Your MySQL version managing your database
Step 6: WordPress Setup
- Input your WordPress username, password, email, and the title of your site. You can also choose whether to install a multisite.
- Click on the ‘Add Site’ button. Local will configure your new site, which might take a few minutes.
Congratulations! Your new local site is now up and running, and accessible from your dashboard.
From here, you can:
- Open site to view your site.
- Wp Admin to go to WordPress Admin.
- Stop site – or start it if it is stopped.
- Go to site folder
- And more…
Explore other amazing features
Blueprints
Because of what we talked about before, you now know how to make and change a WordPress site using Local.
If you often make sites, maybe for your clients, you likely use the same theme, plugins, or even the same important pages (like “Contact”) every time.
Starting from zero for each new site can eat up a lot of time. But with Local’s Blueprints, you can save a site AND all its setup (like themes, plugins, pages, and settings). This way, you can use it again whenever you start a new local site.
To make a Blueprint, first set up the site how you like it with everything you need.
Next, click the three little dots next to the site’s name and choose “Save as Blueprint.”
Name your Blueprint, decide which types of files to leave out (or don’t change anything), and then click “Save Blueprint.”
How to Create a Site Using a Blueprint?
Starting a new local site with a Blueprint is straightforward. Select the “Create from a Blueprint” option during the site creation process (you’re familiar with the steps that follow).
If a Blueprint is ready, you’ll be asked to choose it, like this:
How to share your site created with Local via a link
Are you part of a team or working for clients? Local offers an excellent solution to meet their needs: Live Links. This feature allows you to grant someone access to your site so they can view it online.
It’s incredibly handy because you don’t need to upload your site to a live server.
To activate a Live Link for a specific site, you first need to sign into your Local account. Do this by clicking on the round icon at the top of your dashboard.
Once that’s sorted, you can create a Live Link by clicking on “Enable”.
Once the Live Link is activated, a green dot will show up. To see the details associated with it (link, username, password), just click on the small arrow.
You can change the link, username, and password for each Live Link. Just go to Tools > Live Links. But first, you need to turn off your Live Link.
Database access
If you ever need to look into your WordPress site’s database that you set up with Local by Flywheel, it’s straightforward. Just head over to the “Database” tab. There, you’ll find all the details about your database (like host, name, user, password).
To access it, simply click on “Open AdminerEVO” Local will take you to Adminer, a tool for managing your database.
SSL
Another useful feature is the ability to turn on HTTPS for your local setup. With just one click, you can make it seem like you have an SSL certificate, which makes your connection look secure to web browsers.
To do this, go to the “Overview” tab and click the “Trust” button in the SSL section.
Test Email Locally
When you’re developing your site locally, one common issue is figuring out if your emails are actually being sent and received.
For instance, think about important emails like notifications for new comments, password changes, or the messages sent to administrators after a contact form submission.
To check if everything’s working smoothly, Local uses Mailpit, a tool for testing emails. You can access it for each site individually by going to Tools > Mailpit > Open Mailpit.
Once you get there, you’ll see a list of all the emails that have been sent.
Things to do After Installing WordPress
Once you’ve installed WordPress locally, you’ll gain access to the admin area, which operates identically to any WordPress website. From here, you can install plugins, switch your theme, and explore various WordPress features.
You might also be interested in exploring other methods for installing WordPress locally. For further insights, be sure to check out the article “6 Simple Steps to Install WordPress on XAMPP,”
Should you decide to share your local website with others on the internet, transitioning WordPress from a local server to a live site is a straightforward process.
Conclusion
Local by Flywheel makes setting up WordPress easy for everyone, from beginners to pros. It’s user-friendly and packed with great tools. This guide shows you how to get a local website up and running fast, with setups that you can change as you like and easy links to WP Engine and Flywheel hosting. Use Local for your next WordPress project to quickly turn your ideas into great-looking websites right from your computer.
Howtowebz.com provides detailed tutorials and honest reviews to help beginners make the most of WordPress.
Leave a Reply