0
votes

We use a lot of plugins and unfortunately can't remove more of them. Our backend is slow.

Wordpress is built to load each plugin on every page load, also in the wp-admin backend. So even if you are on pages, where no plugin would be needed, woocommerce, contact form 7 etc. will be loaded. They put their CSS in the page but also do PHP stuff and slow everything down.

We know plugin organizer - a plugin that makes it possible to selectively load certain plugins on certain pages. They have a feature to do it on the backend - but it's a already a hell to work with it on the frontend. We use plugin logic in the frontend now.

Is there already a plugin or a hand crafted solution to select which plugins should be deactivated/activated on with wp-admin pages?

I guess it's needed to load every plugin on every wp-admin page to get the admin menu (the left side menu) - so I might be needed to built this menu and cache it somehow. And then selectively activate plugins for certain pages. We use custom fields - so ACF plugin has to be activated on some pages - also on some woocommercer pages. Polylang (for multilang) must be activated on a lot of pages. But for example woocommerce doesn't need to be loaded on the event calendar pages and vis versa.

Do you know of existing solutions to lower the time needed to build the backend. Are there any caching options?

1
It makes 0 sense to have inactive plugins on a WP site. Can you explain why you can't remove them? I'm also not sure why you say they have to be loaded to build the menu. It's even worse when the inactive plugins aren't maintained (security risk).Aibrean
Wordpress 101: If an plugin is activated (so files are there and it's registered as "active" in the database) it is loaded in each page load. WP needs to load the plugins so that hooks can do their job. For example the hooks (actions) for registering menu items in the wp-admin area. When I say, I want to deactivate plugins on a certain page, than I am talking about filtering the array of active plugins for this page load. So all their hooks and stuff are ignored - for that page load. This is was plugin organizer does de.wordpress.org/plugins/plugin-organizerSebastian Gärtner
Well it's much more clear now that you have edited your original post.Aibrean

1 Answers

0
votes

You cannot activate/deactivate plugins individually for particular pages. Each plugin is either active or not when your site loads.

Here's something to try: In your staging environment, deactivate all of the plugins to see if that solves your problem with the slow admin menu. If it does, reactivate each plugin one by one until you find the problematic plugin. Then troubleshoot from there to determine the root of the issue.

You could also check your server's error logs to see if there are any warnings indicating issues with the site.

If that doesn't help, one final piece of advice I would offer is to contact your hosting company directly to inquire about any potential server issues that are slowing down your site's performance.