deliciousbrains / wp-migrate-db

WordPress plugin that exports your database, does a find and replace on URLs and file paths, then allows you to save it to your computer.
https://wordpress.org/plugins/wp-migrate-db/
341 stars 515 forks source link

Fatal errors caused by compatibility mode - cannot change the compat setting through dashboard #102

Closed thomasfw closed 2 years ago

thomasfw commented 4 years ago

We have a number of mu-plugins installed that have dependencies on other plugins. Because wp-migrate-db disables all installed plugins by default (and leaves the mu-plugins), compatibility mode is causing fatal errors due to missing classes, functions etc. that are no longer available.

Disabling the compatibility option, or re-enabling plugins with the 'Plugins to Load for Migration Requests' setting would fix this for us, but because installed plugins are apparently disabled for the request to save plugin settings, we can't change the settings and fix this through the dashboard (as the fatal errors caused by compat mode persist):

A problem occurred when trying to change the plugin compatibility setting.
Status 500 Internal Server Error
A problem occurred when trying to add plugins to backlist.
Status 500 Internal Server Error

The only solution for us is to manually remove the wp-migrate-db-pro-mu-compat.php file which fixes things, and then make sure the compatibility option is disabled. Because this file is added by default, and we can't change the setting through the dashboard, we've had to SSH into our production servers to remove the file manually.

I'm aware that mu-plugins can't be disabled through hooks, so there's probably nothing that can be done about that? But if you could push a fix for the compat mode toggle that would be much appreciated.


Fix: Assuming excluding the settings requests wpmdb_save_setting from compat check in Compatibility ::wpmdbc_is_compatibility_mode_request() will fix this.

kevinwhoffman commented 2 years ago

Hi there, I'm just following up on old issues. If this is still a problem with the latest version of WP Migrate DB 2.2.1, then please reopen and we can take another look.