Stopping Local Site takes over 1 hour

One of my local sites is taking forever to shutdown. I have optimised the DB, deactivated several plugins and even done a complete uninstall and re-install but still taking forever to stop the site. It’s not a big site at all and other sites of similar size shutdown very quickly.
Any ideas what else I can try?
Upload and download (push and pull) also take a long time.

It happens to me too from time to time. I just quit Local and restart it.

Hey @mic007, welcome to the community!

Given that this is happening during shutdown and Connect events, that sounds like theres some sort of slowness with the DB.

If it is just this one site, is there any custom functionality that used on the site? How large is the database and how much memory does the computer have?

You might also check the logs folder for the site and see if there are any errors occurring for either PHP or MySQL.

Hello @ben.turner
I have had a look at the DB and there are over 6,300 tables! I looked at another of my LOCAL sites and that’s got almost 1000 tables but that one at least doesn’t take over an hour to shutdown.
I noticed that all of the tables seem to have some random alphabetic prefix in front of the table name as defined in the wp-config.php file.
Are there some guidelines / suggestions on cleaning up these extraneous tables?
I imagine that this is what’s causing this slowdown.

Yeah this is the WordPress table prefix. Back in the day, it was more common to have multiple WordPress sites share the same database with each site having its own prefix.

These days, especially with Local, most WordPress sites use the default of wp_ – but one thing you might see is if there are a bunch of tables that are different than the prefix that is set in wp-config.php

Any that are different, and are not being used by some plugin that you are aware of should be candidates for pruning.

For a site like this though, I don’t have any good pointers, just take your time and think through any ways that you can remove the cruft. Good luck!

Thanks for the suggestion. I ended up using Advanced Database Cleaner Pro and with that tool I was able to identify and prune orphan tables (after doing several backups in advance just in case :grinning:)

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.