Local Community

Local is too slow with wordpress and windows 10

Issue Summary

I’m working in a wordpress site with local and windows 10 and is too slow. The website hardly has plugins. Is quite light. I don’t know why is so slow.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    I only have one site.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

System Details

  • Which version of Local is being used?
    The latest (6)

  • What Operating System (OS) and OS version is being used?
    Windows 10 Professional_

  • Attach the Local Log. See this Community Forum post for instructions on how to do so:

Sorry, that isn’t the log

I think is it I’m attaching nowlocal-lightning.log (333.4 KB)

https://localwp.com/community/t/optimizing-local-lightning-performance-on-windows-10
and
https://localwp.com/community/t/performance-issues-with-local-on-windows-10

might help, but yeah… I’ve been finding it painful to work with WP on Win10. I’ve even dabbled with trying to run Local on the Windows Subsystem for Linux and that seemed promising, but that’s super exploratory and l have regressed to where I cannot even install it.

Hi!

Thanks so much for your answer.
Does it mean there is no solution?

Well, I don’t work here, but I’ve been working on this for a while and I don’t think I can use Local.

Several of the tweaks in those threads now seem out of date for Local 6. But I’ve tried changing the DB_HOST to '127.0.0.1' and excluding the Local files from my Anti-virus. (I’ve even tried turning my AV off temporarily). Still, Local is 30-60 seconds per admin page.

So I am testing out a bunch of other options. Lando looks so promising, but I’m getting similar page speeds. I won’t even go near VVV after my last experience. Gonna test Desktop Server again today. And possibly set up a LAMP stack in the Linux subsystem… though I’d prefer to stay away from setting up a server via command line. The whole point of these tools was to try to avoid doing that myself. Plus putting my working files in the Linux subsystem is supposedly great for speed, but means I can’t use my preferred git client.

Laragon was loading pages in 1.5 seconds for me… so that might be the winner. It’s UI isn’t as pretty as Local, but it is performing way better at the moment, so I don’t have much choice but to change tooling.

Thanks so much for your answer.

I think that for wordpress sites Desktopserver is the best option but you can only develop 3 sites in the free plan. I tried XAMPP and it’s no so “friendly” as local but page speed is better.

I exclude from Windows defender the folders indicated in the link you provided and the page speed is better now. Is not good enough, but it’s better. After finishing this project I think I will change to Desktopserver or go back to XAMPP.

Check out Laragon too. I am having some success with page speed there. I’ll probably be picking between Laragon or Desktop Server. For myself, just working on my plugins I don’t need unlimited sites so their 3 site limit is not really a barrier for me. Heck, until a week or so ago Local had a 3-site limit too.

Thanks so much for your recommendation. I will try Laragon too.!

Do you have a list of plugins that are on the site? I’d love to start zeroing in on the kinds of things that are making a Local site slow on Windows.

I’d love to dig into this more. In my mind, the first question is where the performance slowdown is happening:

  1. Is it happening within Local with slow click events or transitions within the Local UI?
  2. Is it happening within the Web browser for the actual WordPress site?

That second option is more than likely due to a specific mix of plugins and themes, so it’s hard to replicate without knowing more about an individual site. I’m happy to take a closer look and try to replicate if you can point me to an example site that I can test on.

For the first item – slowness of Local itself – I was able to replicate a bit as well as tinker with Windows settings to improve things. For reference, here’s what I did:

I have an older Dell xps 13 i5-5200U with 8.GB ram. (I think 2015 model?) It runs Linux well and a somewhat clean install of Windows eventually runs ok, but the overall OS feels sluggish to me.

One thing I noticed right away is that there was some slowness within Local when creating new sites. I was curious to see what things were going on and after opening the Task Manager and monitoring things during a new site creation, two things stood out:

  1. SearchIndexer.exe
  • According to Howo Geek, this is indexing new sites so that they are available for windows to search.
  • Add exclusions to “Windows Search Settings”
  1. msmpeng.exe
  • According to Howto Geek this program looks like this is part of Windows defender and is probably scanning all of the files that are being created when a new site is created.
  • Add exclusions to “Virus and Threat protection” settings.

Zooming out a bit, creating new sites does create a lot of files. Off the top of my head there are:

  • All the WP files
  • All the “server” files (configuration and data files for PHP/nginx/MySQL)

I went ahead and added exclusions for Local related files to both of those tools and creating a site does feel faster. That might be a good first step. Would you be able to record a screencast so that I can take a closer look and have a better idea of how to replicate the issues that you are seeing?

1 Like

I also have this very slow problem on Windows 10. I’m mostly concerned about the poor speed in the browser as I develop the new web site. I just tried your suggestions above. They had minimal improvement.

The site has the Astra theme, There are a couple of plugins that I use all the time.

For troubleshooting performance issues within a WordPress site as experienced from a browser, I often recommend using the Query Monitor plugin: https://wordpress.org/plugins/query-monitor/

It allows you to get detailed information about what kinds queries are being run in order to generate a page.

Game changer for me was to install LocalWP on a program called RamDisk by Dataram, which creates a virtual drive on the RAM. It. is. so. much. faster. There were some security issues to work through (like the hosts file needing to be excluded in Windows Virus Protection), but it solved all speed issues on Windows and LocalWP finally works like a dream.

I’ve been using Local on my Mac for years without any trouble but have now moved over to my Windows machine and have experienced painfully slow load times, on a fresh WordPress install without anything installed.

I’ve ran through the suggestions above and none of them worked for me, although changing the WP config to 127.0.0.1 made a slight improvement but not much. I then looked at the settings for the site and I had it set to PHP v8, so I tried lowering it to PHP v7.4.1 and it’s lightning fast. Set it back to PHP v8, painfully slow, back to 7.4.1 lightning fast again.

So, for me it seems the poor performance is related to selecting PHP v8, for whatever reason.

Hi John, did you try the last one about using RamDisk? This was a last ditch effort for me but it worked! Here’s the article I found that helped me. The RamDisk part is a ways down the page:
https://onesmartsheep.com/wordpress/install-wordpress-on-windows-10/

This is pretty cool info, and thanks for sharing that blog post link!

I know that Local might have some issues being installed on a separate partition. To be specific “Local” doesn’t mind, but some of the server software doesn’t like it.

@so1era – Using Ramdisk, are you able to create and use Apache sites? Nginx doesn’t have any problems spanning Windows partitions, but Apache is posix-focused, so it sometimes fails.

One other thing I’m curious about – what’s the general specs of your machine? For example, how much ram do you have and how much did you allocate to that new ramdisk partition?

That’s really good info, and I don’t think I’ve really dug into the performance differences between PHP versions.

Okay, more info:

The project I have going that I mentioned previously is still running fast after lowering the PHP version, so that’s going good. However, I migrated another project over to this Windows machine and set up the server using the same versions as it was previously set on my Mac and it’s slow.

  • The first one that’s now fast is set to use PHP 7.4.1 (downgraded from 8.0 at setup) and MySQL 8.0.16.
  • The new slow project is set to use PHP 7.4.1 and MySQL 5.7.28 from setup.
  • Upgrading the new slow project to PHP 8.0 makes it unusable.
  • Downgrading back to PHP 7.4.1 it goes back to slowness it was previously.

So, from my end the only differences between these two installations now are the MySQL versions and that the first project was initially setup for PHP 8 & MySQL 8.0.16 but is now PHP 7.4.1 and the lastest project was setup with PHP 7.4.1 and MySQL 5.7.28.

When I have time I will try move this new project onto a new installation set as PHP 8 and MySQL 8.0 like the first project, then downgrade to PHP 7.4.1 to see whether anything changes. May be coincidental but you never know.

This is really great info, thanks for sharing!

In addition to responding here in the forums, I’m trying to improve the automated testing Local has for the various build targets we support.

I’m curious how your are testing performance – is it mostly just a “it feels slow” process, or are you using some hard numbers, like a ?

Both are fine approaches, but in terms of trying to automate this sort of testing, I’d really love to zero in on a process that is scriptable and has real performance metrics associated with it.

I haven’t tried these tools under Windows yet, but in case you are inspired and curious about what I’m exploring, you might take a look at these two tools:

Well I am back on Local after Serverpress got unusable too. Local is currently loading pages between 1-2 seconds… so not as good as a linux droplet, but a big improvement from my earlier post! I think one thing that made a big difference was nuking my database and starting from scratch. Per the above suggestion I’ve also downgraded my PHP to 7.4.1.

It still feels like there’s a delay in resolving the DNS… but that’s purely a hunch since Query Monitor doesn’t say there are any slow queries or API calls (usually in Airplane mode)

I’m curious about the RAMdisk situation. 1. I can’t get it to run. and 2. doesn’t anything you store on RAM delete every time you shut down the computer? So wouldn’t you then have to reinstall Local every time you restart?