If you find yourself in the position that your favorite development tool, Local WP, is not working as it should, it can be frustrating. After all, there’s nothing worse than feeling stuck due to a software error.

To help you get over this road block quickly, in this article, we will list solutions to common issues you may encounter in Local. That way, you can hopefully troubleshoot the problem by yourself and get back to work in no time.

General Troubleshooting Tips for When Local is Not Working

If you run into a problem with your installation of Local, here are some general steps you can take to try and solve it.

1. Narrow Down the Issue

Check if what you are experiencing only occurs on one of your sites or all of them. If it’s just one, there might be something wrong with that particular installation. If it’s all of them, it is probably a general error inside Local.

Should you not have another site, simply create a new one in Local and check it for the same issue. This is an easy way to narrow down the scope of the problem.

create fresh site to figure out why local is not working

2. Log Into the WordPress Back End

wordpress dashboard in back end

If there is an issue with a particular site, try logging into its admin area and see if the problem still persists. Sometimes errors can occur with a WordPress theme and cause problems on the front end of your website. If the problem does not persist in the back end, that’s a likely option and you can try changing your theme to see if it goes away.

3. Restore Your Website

If the problem still doesn’t go away and is also visible in the back end, see if a restore of the website helps. If you need more information about this, we have an entire article on that topic that will guide you through it step by step.

import site into local from zip drive

4. Check the Logs

Inside the Local menu, you find the options Reveal Local router’s logs and Reveal Local’s logs.

local access logs

Clicking either will take you to the location on your hard drive where Local stores its logs. Opening them with a simple text editor can help you understand what’s the problem.

local error log example

And you know what they say, a problem defined is a problem half-solved. (Do they really say that? And who are they? Oh well, let’s not get sidetracked.)

Especially if something is not working across all your local sites, checking the router log can give you a better clue about the problem. Even if you don’t understand a certain error message, it can at least identify the problem. A simple Google search or look into the Local community forums will likely get you closer to a solution.

find help in the local community when it's not working

5. Update Local to the Latest Version

Local is constantly being updated to fix errors and add improvements. If you continuously run into a problem, it might be something that was wrong in an earlier version and has been fixed by now. In that case, updating to the latest version would offer a solution.

To update Local, click on the menu in the upper right corner and click Check for updates.

local check for updates

If there is a new version available, follow the prompts to have the program automatically update. Local should also check for updates by itself but you never know.

6. Restart Local and/or Your Computer

It Crowd Parents GIF - Find & Share on GIPHY

It’s a cliche that when you call technical support, the first question they will ask you is “have you tried switching it off and on again?” However, it’s a cliche for a reason. When it comes to computers, sometimes things get stuck and simply restarting the process is enough to make the problem go away.

Alright, now that we have gone over general troubleshooting tips, let’s turn to some concrete problems that you might encounter in Local.

Trouble Importing Website Into Local

Exporting from and importing to Local is very easy and one of the features that makes it a pleasure to work with. However, sometimes when trying to import your site, you can find that Local produces an error message.

local site import error

When that happens, you can check the following to fix the issue:

  • Are you not using a zip file? For importing data into Local, your files must be zipped up, otherwise the software won’t process them.
  • Are you trying to import more than one SQL file? Some websites have more than one database but Local only expects one file at import. So, if your site uses multiple databases, import the main one and import the others manually.
  • Are you working with corrupted files? If you are unable to import your site into Local, try pulling a fresh copy and try importing again.

Trouble Starting the Router – Port Blocked

The way Local works is that it creates a local router to be able to create custom domains for each site it runs. That router is working on a specific port (a virtual network connection point) on your computer, usually port 80. However, only one application can use a port at once, everything else will get blocked.

Therefore, if you already have an application running that is using it, you might find yourself in the situation that Local tells you it is unable to start the router.

local can't start router

In that case, you have two options: The first one is to figure out which other software is using the port and switch it off. Obvious candidates here are programs that do similar things as Local, e.g. XAMPP. If you are using that, the fix might just be as simple as closing that program and trying again in Local.

If there is no such obvious choice, you first have to find out what is blocking port 80. To do so on a Mac, open the command line and enter one of the following (they work for different OS versions):

lsof -n -i4TCP:80 | grep LISTEN lsof -n -iTCP:80 | grep LISTEN lsof -n -i:80 | grep LISTEN

It should let you determine what application is using port 80 so you can close it. There is also a paid program that can do this, called PortsMonitor (it has a free trial).

On a Windows computer, you can find the blocking process by entering the following in the command line (run it with administrator privileges):

netstat -anb

Find the process file name under where it says 0.0.0.0:80. That’s the thing blocking your port. If you don’t feel comfortable with the command line, you can also use a program like TCPView.

Switching to Localhost

If you absolutely, positively can not disable the other program, there is another option, which is switching Local to localhost router mode.

The downside of that is that it will disable custom domains for your local websites. So, instead of something like my-local-test-site.local, it will be similar to localhost:10005 and you will have to remember the individual ports of your different websites (or find them in the Local user interface).

localhost site address

You also won’t be able to use HTTPS or the Live Link feature.

You can change to this router mode in the main menu under Preferences. Go to Advanced and use the drop-down menu on the right to switch router mode to localhost.

how to change local to localhost router mode

Hit Apply and your site addresses will be switched. Be aware that Local might give you a warning that the site URL does not match the host set in the program. Simply click Fix it in the prompt to resolve that.

Error Pushing and Pulling With Local Connect

Local Connect is a neat feature that allows you to push and pull your website directly from and to your hosting account at Flywheel or WP Engine.

local by flywheel connected to server

If you are running into a problem and getting errors where you can’t perform either of these actions, it’s most often a problem with the connection credentials. These can sometimes expire on the site of the host or you may change your password and forget to update it in Local. Either way, it means Local no longer has access.

Thankfully, the solution is pretty simple, you just need to reset the connection. For that, go to the Connect menu on the left side, where it should list your connected hosting accounts.

list of hosting accounts in local connect

Click on My hosts in the upper right corner and log out of your accounts.

log out of hosting account

Then, use the big green button that appears in the menu to reconnect.

local connect menu

Enter any necessary login information and you should be able to push and pull sites as before.

Local by Flywheel Is Slow – Fixing Performance Issues

If you find that Local is not working properly because it slows to a crawl, here are a few things you can try:

  • Stop any sites in Local that you are currently not using, especially those with large databases or many plugins installed.
  • Check your task manager or activity monitor to see if there is any program that is hogging resources that you could close.
  • Restart Local. If your entire computer is slow, restart it as well.

If the above doesn’t fix the problem, it’s time to dig into your individual sites:

  • Check for console errors with your browser developer tools.
  • Use Query Monitor to find any queries slowing down your website.
  • Increase memory_limit, max_execution_time, and max_input_vars inside php.ini.hbs within the conf/php/ directory of that site. Don’t forget to restart the site after making changes in order for them to take effect.

“Your Lightning Services Are Missing”

Another issue that you can encounter when using Local from time to time is the above mentioned message. While this sounds a little cryptic, it usually pops up when your PHP version is not set up correctly. The solution is also really simple: open the overview of the site in question and click Apply next to the PHP version.

update php version when local lightning services missing

Alternatively, if that is not available, use the drop-down version to change to another PHP version and hit Apply afterwards. That should fix it.

SSL Is Not Working in Local

Local makes it very easy to use and test your local website with an SSL certificate. Simply choose one of your sites and click on the Trust button in the SSL row.

trust local ssl protocol

After a short moment, you should be all good to be using the HTTPS version of your local website.

However, this functionality is not without the occasional error. If you find that the SSL certificate is not working in your installation of Local or for a specific site, here are some troubleshooting tips:

  • Manually access the HTTPS version of your site. Simply open the site in a browser and change the http:// in the beginning to https://. If that works, you might simply have to do a search and replace for your website’s database to change the URL mentions to the secure version.
  • Try using another browser. If the problem is only visible in one browser, it might be something with the browser, not your setup.
  • If the problem persists, pay attention to the error code your browser displays. It might also help to click on the not trusted button next to the browser bar to get more information.
ssl warning in browser

By the way, there is a known issue with BigSur, the latest version of MacOS. If that’s what you are running Local on and have problems with the SSL, check out this post to learn how to manually add the SSL certificate to Keychain.

Local Not Working? No Problem

When your favorite local development tool is not working as it should, it can be really annoying. Unfortunately, no software is perfect and issues can crop up from time to time.

Above, we have covered general troubleshooting tips for when that happens as well as concrete solutions for some common problems in Local. Hopefully, these will be enough to get your program back on track and allow you with your local developement.

What other problems did you encounter while using Local and how did you solve them? Share your woes in the comment section below!

The post Is Local Not Working Correctly? 13 Solutions to Common Problems appeared first on Torque.