WP Plugin idea/search: Selectively activate certain plugins on certain wp-admin pages - wordpress

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?

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.

Related

When saved, WordPress editor automatically adds "rel=nofollow" to every external link

currently I'm running into this issue, where external links are automatically set to no-follow by WordPress. As of now I wasn't able to detect the source of this behaviour.
The page uses the Classic Editor (v1.6.2) Plugin - however, the problem still occurs without the use of this Plugin.
There are a bunch of other plugins installed but those are not directly involved with the post editin feature of WordPress. Are there any clues which might cause this issue?
If you need any information I can provide.
Which other Plugins are you using?
Are you maybe using RankMath or another SEO Plugin?
These have a setting to make all external links with "rel=nofollow". You would need to deactivate this or add an exceptions for specific domains.
Check the settings.

Remove unwanted Url variable when WooCommerce is active in Wordpress

I've been facing some issues lately with our new business website. Basically, when the homepage is loaded www.motionitalia.it it looks like to redirect to another page https://www.motionitalia.it/?v=e0c86157e86f. I've asked a friend and he suggested that it might be related to the cache.
I tested the website using Site Health's tool called diagnostic mode and I deactivated all the plugins. It turned out that the ?v=e0c86157e86f appears when I activate Woocommerce.
I would like to remove it from the URL because it slows down the website and it doesn't even look professional. Has anyone of you ever experienced it? If so, could you suggest to me a way to fix it?
This is due to WooCommerce geolocation with page caching support enabled
To disable ?v=e0c86157e86f like from WordPress Urls when WooCommerce plugin is active, Go to WooCommerce Settings > General (tab), then for "Default customer location" select "Geolocate" instead of "Geolocate (with page caching support)", then save.
As you will see, the Urls are now clean without ?v=e0c86157e86f like.

How to Prevent Cart from clearing on registration in Woocommerce?

If a user adds a product to card, then goes to account page and registers a new account, the product(s) in the cart are automatically removed. How to prevent this behavior?
Try following these debugging steps:
https://businessbloomer.com/woocommerce-solving-cart-empty-issue/
Fix 1. Make sure there is no “red alert” under WooCommerce / System Status
Fix 2. Click the following buttons under WooCommerce / System Status / Tools
Fix 3. Check your Theme, WooCommerce & WordPress are using updated, compatible versions
Some premium themes won’t notify you if there is an update available. You have to make sure you’re using the latest, Woo-compatible version. Check with your theme vendor, plugin developers and see if anything has been reported.
For example, you might have updated WooCommerce too soon – sometimes premium plugins/themes require a few days/weeks before they can adapt to the new changes (if major) and become 100% compatible.
Fix 4. Save (flush) your permalinks
Go to WordPress/Settings/Permalinks and click on “save”. This should flush the permalinks and give you a chance to test the cart again.
Fix 5. Check you have no spaces in your checkout end-points
Go to WooCommerce/Settings/Checkout and make sure you have no spaces in your end-points. This happened to a client a while ago and it too me ages to find out (who would think the permalinks had been changed?):
WooCommerce Checkout Endpoints
Fix 6. Properly set up your WordPress cache plugin
Cart and Checkout pages should not be cached – if your WordPress cache plugin is for some reason caching WooCommerce pages, your cart will probably show as empty. Make sure to select a WooCommerce-compatible cache plugin 🙂
Also: ask your hosting to disable or properly set up server cache
Some hosts have their own cache system and this is sometimes applied to your website by default. Create a ticket or give them a quick call to find out if they have anything like that and if they can disable that as soon as possible.
For example: WPEngine uses its own cache. This might affect your WooCommerce Cart. Please contact support so they can create a caching exception list for WooCommerce and/or ajax files
Fix 7. Disable all plugins but WooCommerce
This is a typical troubleshooting operation. Disable all plugins and see if the Cart is back functioning. If YES, reactivate one plugin at a time and test the Cart again. As soon as you find the “guilty” plugin – yay! – time to substitute that plugin or see if there is an update available!
Fix 8. Try switching to a default WordPress Theme (e.g. TwentySixteen)
This is to prove the error is not theme-related. You won’t lose any content if you switch between themes, so don’t worry. If the error goes away, then check with your theme developers and report the bug 🙂

Plugin content type URLs break after Wordpress plugin upgrades

We use a plugin that creates a content type and dynamically generates pages for that type. It works fine except that when when we upgrade plugins (especially The Event Calendar, which also creates a content type, but doesn't experience this problem), this sometimes (but not reliably) causes all of the page URLs generated by the plugin to stop existing. When you go to those URLs, you get a 404 error.
This problem can be fixed by going to the site's permalinks page and (without making any changes) saving the settings.
I looked for a solution that would prevent the problem from happening, but have not been able to find one. I wasn't able to figure out a way to mimic what happens when you save the permalinks settings for each site, and I haven't been able to figure out what might be triggering the problem. I currently "solve" the problem by using a Selenium script to go through each permalinks page in our multisite and click the save button on each automatically after I update plugins.
How can I:
Track down the source of the problem.
Set up a content type that will not unset itself in the wrong circumstances.
Failing either of those things, implement a backend solution that will do what I am currently doing on the frontend, but in a fully automatic way.

How to delete all plugin references in database?

How does one completely remove a plugin from WordPress?
I have deleted the plugin via WordPress admin and then reinstalled, problem persists.
I see 8 records in cmsoptions table referencing the offending plugin. Since WP Admin drags to a grinding crawl with the plugin active, and for weeks the plugin was working just fine, I have to conclude that the problem exists due to the plugin references in the DB.
If anyone has the inside word on completely obliterating a plugin from WP, please do share.
The the options API (http://codex.wordpress.org/Options_API) is open to the plugin to store whatever data it wishes (under whatever name it wishes). You'd have to search the plugin code to see what it is storing (and how) in order to get rid of the offending data.
The issue isn't with WordPress, it's with the plugin. WordPress is a framework and can't take responsibility for whatever gets built on top of it (ie plugins). It's like blaming a hammer for a poorly built house.

Resources