Windows Performance Fix!

Hey guys,

Create Local WP sites in a separate folder. Do not use the default folder (C:\Users\YourUsername\Local Sites)

Sites running within the default folder are slow on Windows. They run lightning fast under any other folder. I hope this trick helps to end all performance issues for windows once and for all. I hope team fixes this bug in next release.

1 Like

Hi @LocalWP_Windows - welcome to the Local community! :wave:

Thank you for sharing this tip with other members of the community.

Our team has discussed the hack you mentioned in this thread with other Local users and it does indeed appear to improve Windows performance.

That said, it is well on our radar to spend time enhancing the performance of Local for Windows machines.

Thank you again, we appreciate you!

Sam

OK, I’ll bite…

I just installed Local and found it impossibly slow. This is on a machine that has been running Docker (not started when using Local) to host my local WordPress development to date without any issues.

In short, I was just about to give up on Local altogether when I came across this issue. Sure enough, I created a new site in a different folder and now it is flying.

This all begs two questions…

  • After all this time (looks like this is a known issue) why isn’t this even mentioned in the performance document that has been published.
  • Given that I - and it seems others too - find the default location impossibly slow…why is it the default?

I wasted quite some time looking at this (including reading the published docs about performance) and it’s REALLY unfortunate I had to just get lucky and find this post, instead of being given that information.

Since this was reported last year (and, I suspect, has existed for a long time), seems to have been accepted as a known issue, that’s not a good look (“That said, it is well on our radar to spend time enhancing the performance of Local for Windows machines.”).

I welcome thoughts.

Hey @MarkW - thanks for checking out Local!

I’m the Product Manager on the Local engineering team, and I appreciate you asking tough questions. It’s how the Local team and product improve and get better, so thank you.

Windows performance issues have been a tough nut to crack… mostly because it isn’t consistent. Some users report it is slower, but not all. Some users keep sites in their C:\ drive and never have an issue. We have several Windows machines on the engineering team and haven’t been able to put our machines into the same slow performance state either. We’ve left it the default but given users both a site-by-site and a global preference to control changing this value if desired.

I agree with you on making these troubleshooting steps more clear for Windows users; not having that clearly stated in the help doc on performance is a miss. I made an update to that help doc and published it so that Windows users have some guidance on what to try - Troubleshooting Performance issues in Local - Local

I apologize for the time spent chasing this down. Hopefully the help doc change makes this much more clear for other users going forward. We’ll continue to evaluate if making changes to the default makes sense. Any feedback you can provide us on this or other areas we can improve Local is immensely helpful.

Thanks again,
Austin

@austinwendt - you saved the day (and very good timing). I was just about to kick off a non-aggressive (not my style!) but somewhat blunt post about how surprised I was with my experiences. But I am encouraged and respectful of your reply. Thank you.

So, let me give you a quick update and ask some questions. Having seen - somehow (see below) - your product perform well, I am actually quite motivated to resolve all this. So I will answer any questions you have, if it will help us get closer to a resolution. For the record, I worked at a certain very large company (one beginning with M and with lots of Windows! :)) so can help dig in somewhat technically, as necessary.

I don’t know exactly how I did it bit I THOUGHT I created a site yesterday that was outside of c:\users (based on this thread). I ran it and it was flying. So, problem fixed I thought.

However, now I try to do some more work I am not able to create anything outside of c:\users (I am sure you are familiar with that message). I have no idea how I did did that yesterday! But that aside, even if I use c:\users (still outside of Local Sites), the performance is unusable. Literally minutes between pages.

As I say, I am more than happy to provide any more information. Thank you again for the timely response and also for updating the document.

2 Likes

@MarkW Well I’m glad I came in in time :slight_smile:

A couple of questions from me:

  1. What version of Windows are you running?
  2. I believe I’m familiar… but could you share a screenshot of what you’re seeing when you try to create outside of C:?
  3. The slowness between pages could be because of DNS and the domain suffix. What is the site host/domain for your site? Depending on the mode local is set to, it could be either localhost or something like mysitename.local, unless you’ve changed it.

Thank you, @austinwendt.

  1. Windows 11 22H2 (build 22624.1610).
  2. Screenshot attached
  3. localhost

I hope this helps.

image

By the way, I just want to clarify one potentially important aspect of this, @austinwendt.

I am not trying to create sites outside of C:. Instead, I want to create a folder outside of c:\users. When I use a folder inside c:\users I am seeing the same sort of performance that I see when I have sites under …\Local Sites.

So, I have created a folder (let’s call it c:\mysites) but the UI doesn’t allow me to point to it (see error message). Is that supported and, if not, I am curious why not.

I would also like to know if I am going crazy when I say I DID create a site outside of c:\users yesterday. I was pretty excited because the performance issues disappeared when I tested this. But now I can’t create sites outside of c:\users? Am I losing my mind? :slight_smile:

I’m not sure where you were able to make the site - do you still have that site on your machine? You should be able to see the file path if it is still exists!

Interesting on the localhost - can you try switching to Site Domain mode in Preferences > Advanced?

  1. Switch to Site Domain mode
  2. Come back to your site
  3. You’ll probably have to “Fix it” to update your hosts file
  4. See if the site performance improves
  5. If not… try changing your Site Domain to something other than .local - .abc for example
  6. Test again

Let me know if those do anything?

I will try these suggestions, @austinwendt, and let you know. However, I’d like to clarify one aspect.

On my initial change that forced the “Fix it” message, I am seeing the Provisioning message (and the animated dots under “Site host”) remain for a long time. I am about 10-15 minutes in, since I made that change, and the provisioning status remains i.e. it hasn’t finished the fix yet. I assume that is unexpected, right?

Thank you.

Immediately after I sent that previous message, the provisioning finished (about 15 mins) but my site is now broken, with this (and many other) errors.

WordPress database error: [Table ‘local.wp_terms’ doesn’t exist]
SELECT t.term_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('erropix_scripts') ORDER BY t.term_id ASC

I am going to create a whole new site and see if that helps.

By the way, I am still not clear on whether I should be able to create a site outside of c:\users? I am still within that because I am blocked from using a folder outside that. But I feel really sure I created one outside that and it was super fast. Is that simply not possible i.e. I am mistaken?

@austinwendt, not having much luck here. Tried to create a new site and now get this error (first time I have seen this). I did get the admin popup to confirm access and accepted that.

I just tried creating another site and that fails too. So I seem to be unable to create any sites at the moment, even under c:\users. I’ll continue to investigate but welcome any thoughts.

image

10-15 minute provisioning status - yes, that isn’t expected… something isn’t right there. The database errors are interesting as switching from localhost to site domains doesn’t affect the database.

Local does lock down sites to the C:\ drive on Windows (why, I’m not sure). Do you still have the site you believe you created outside of that? If it is still in Local, you should be able to see it’s file path.

The EPERM error just means Local doesn’t have elevated permissions to write to that directory.

As far as troubleshooting this - it’s fairly easy to toggle back and forth between Site Domains and localhost. If you go back to localhost, do these errors all resolve?

Thank you again. I will have more time to spend later this morning (PT), but I again want to clarify one potentially very important issue, to make sure I am not missing something.

I have asked whether Local should be blocking site creation outside of c:\users. Your response was…,

“Local does lock down sites to the C:\ drive on Windows”

I want to be really clear on this - it’s not the c:\ I am asking about. It is specifically the c:\users folder. Your reply seems to imply I should be able to create sites anywhere on the c:\ drive, yes?

I can’t create any sites outside of c:\users. Should I be able to create sites in, say, c:\MySites?

Thank you.

OK, I think I have a significant clue, if not an explanation.

I was just playing around with the routing mode. I had it set back to Site Domains (in preferences) and created a completely new site. That seemed to be created OK. However, when clicking on either the admin page or trying to navigate to the site I received 404 errors.

So, I then switched that back to localhost. Here’s where it gets fun.

I saw the message to Fix It (see below). However, without actually fixing it I am able to completely navigate to my site AND it’s very quick.

It seems Local is getting confused.

  • When the Fix It message is NOT visible, my site is unreachable.
  • When the Fix It message IS visible, I am able to access my site without any issues.

By the way, although I’d still like to know if I should be able to create sites anywhere on my c: drive, my earlier mistake was that I was trying to create a site under c:\users, as opposed to c:\users<myname>. Dumb user error, but that at least explains that part.

I tried to provide some good information about what I was seeing but never got to the bottom of this. Sadly, Local doesn’t seem anywhere near as reliable/performant as I would like.

I see the value in some of the benefits it offers but it’s been a nightmare to set up (in terms of seeing performance that is viable). I find that frustrating since on this same machine I have been running Docker images just fine and with excellent performance. But the ongoing difficulties of running Local under Windows means that, sadly, it’s not worth continued effort trying to figure out why it is so slow.

Could this lockdown have something to do with the way you install Local? E.g. installing for a single user vs all users?