Hello everyone. Today we are going to tell you about a solution that saved us many hours of work recently. By deactivating plugins looking for error, we deactivated a necessary plugin for the theme and we could not enter wp-admin to change it. We had to change active WordPress theme from PHPmyAdmin . We had to temporarily activate the default theme to be able to activate the plugin again and thus be able to work again. We tell you how we did it.
Why did we have to change the active WordPress theme?
First of all, we are going to tell you why we had to resort to this method.
When there are errors in WordPress, it is advisable to deactivate plugins until you see which is the culprit. If you search in forums and on the internet, they all give the same solution. “Disable plugins until you find the one that is causing problems.” The theory is fine. We can assure you that this method of deactivating plugins works (although plugins are not always the problem), and we recommend it.
The problem comes when the theme that is being used requires plugins to function. For example, the topic “ Applauz “that concerns us in this case. This topic makes use of its own editor” Bold Builder “, which in turn is a plugin. This problem also occurs with themes that depend on Elementor . Elementor is a well-known editor on which many themes are based, and when deactivating it, it breaks the page.
In our case, disabling Bold Builder broke the theme and we couldn’t access wp-admin to change it. The website also appeared broken with various errors. Houston, we have a problem.
How do we solve it?
The first, of course, whenever we make changes (activate / deactivate / install new plugins or themes), you always have to make a copy of everything (database and files). Luckily, we had backed up. A priori, you might think that it is the best solution (it usually is): restore a copy of how it was before.
By restoring the copy we would solve the problem , but this would require on large sites with many photos, several hours . Luckily, we found this solution that saved us several hours of work restoring the environment. Once this trick was discovered, it didn’t take us five minutes to fix the problem.
The data we need are:
- FTP access
- Access with PHPmyAdmin to the database
- Database server
- Database name
- Database user
- Database password
All the data in the database can be found in the wp-config.php file of the WordPress installation.
Solving the problem
Once connected to PHPmyAdmin and FTP, we can start. At this point it would be advisable to make a copy of the environment (most hostings allow it to be done quickly by cPanel). If we do not have a fast copy of the environment, it would at least be advisable to export the database from PHPmyAdmin.
With the copy made, we can start looking for the data we need. We must access the table wp_options . By default in WordPress, tables are created with this prefix, but it is possible (and recommended) that it be different. For instance: wpna_options as in this case.
Once in wp_options (or its equivalent), we must look in this table for the rows template and stylesheet . They are usually located in the page 2 .
Once these values are located, we must modify both by the default theme folder name . For this we will use FTP access. We will have to place ourselves on the folder “ wp-content / themes “of the WordPress installation. In this folder, the installed themes appear. In our case, the most recent default theme is” Twenty Twenty One “, and its folder is called” twentytwentyone “. This is the value, which we must enter in the database, in the two lines mentioned above.
Final result after changing the active WordPress theme
After this change, the default theme will be used. By not depending on a plugin like Bold Builder to work, we can access wp-admin. The appearance of the site will change radically, but we will have no problems accessing the administration part, as it does not cause errors with the theme. Once this is done, we can activate the Bold Builder plugin again, and then enable “Applauz Child” or “Applauz” as an active theme in case you don’t use child themes. After this, the site will go back to having the appearance of before, and everything will have been a scare.
If you don’t want to miss tricks like this, and the world of databases. Do not hesitate to subscribe to our newsletter monthly. With just one email a month you will be informed of our publications and you can unsubscribe whenever you want.
Follow GPS on LinkedIn