The upgrade process to WordPress 2.5 was as smooth as it can possibly be — simple, fast and without a single error message. However, there were a few problems that became apparent only after the upgrade. This article will explain those issues in detail and show how to solve them. Here is a short list of problems solved:
- When trying to log-in after the upgrade, the following error message is displayed: “You do not have sufficient permissions to access this page.”
- Yet Another Related Posts plugin returns “Fatal error: Call to undefined function merge_filters() in … includes.php on line 73”.
- Popularity Contest plugin returns “Plugin could not be activated because it triggered a fatal error” when reactivated.
Here are the problems in detail with the suggested solutions:
Problem: “You do not have sufficient permissions to access this page” error
Description: You follow the upgrade instructions supplied by the WordPress 2.5 which state:
- Delete your old WP files, saving ones you’ve modified.
- Upload the new files.
- Point your browser to
- You wanted more, perhaps? That’s it!
After creating a backup of all the files, I deleted them from the server (including the
wp-config.php one) and uploaded the new ones, and pointed browser to
/wp-admin/upgrade.php to discover that it asks me to create a new
For some reason I decided that instead of creating a new file, it would be easier to upload the previous
wp-config.php which I thought contains all the information necessary also for the WordPress 2.5. That seemed to help as I was able to continue the upgrade and all the update scripts run successfully.
However, after supplying the credentials for the log-in, I was greeted with the following error message:
After a few Google searches, it was clear that it had something to do with the user permissions and the way they were handled in this new version of WordPress. I also remembered reading about the SECRET_KEY which has been introduced in WordPress 2.5. It all lead to the idea of actually modifying and using the version of
wp-config.php supplied with this new version of WordPress.
wp-config.phpfrom your previous (2.3 or earlier) installation of WordPress, but rather edit
wp-config-example.phpsupplied with the WordPress 2.5, save it as
wp-config.phpand upload to the root directory of your blog. More detailed instructions are available in this section of WordPress Codex.
Equally you could simply follow the ‘Create a Configuration File’ link and supply all the information there.
Problem: Yet Another Related Posts plugin returns “Fatal error: Call to undefined function merge_filters() in … includes.php on line 73”
Due to the fact that this plugin uses a “dirty, dirty hack” to:
avoid a loop in
apply_filters('the_content'). The code is straight up stolen from
wp-includes/plugin.phpand, with the exception of the single hack line below, should match what happens in
In WordPress 2.5 the
apply_filters() function found in
plugin.php has changed a lot, therefore the altered version of this function in Yet Another Related Posts plugin should resemble these changes as well.
Note: This 1.5.2 version of Yet Another Related Posts plugin will not work with versions of WordPress prior to 2.5.
Although this plugin doesn’t offer widget support by default, I use it together with my Custom Function Widgets plugin and it works like a charm. And I am proud to say that Custom Function Widgets plugin didn’t require any changes at all — it just works.
Problem: Popularity Contest plugin returns “Plugin could not be activated because it triggered a fatal error”
Description: This problem occurs only during a fresh installation/activation of the plugin or when it is reactivated after an update.
popularity-contest.php, go to line 59 and replace
Solution was originally described in this section of WordPress Support forum.
On a Sidenote
It may seem that these errors could be a significant obstacle for the not-so-savvy WordPress users to successfully upgrade their blogs. In reality, however, it should be emphasized that the rest (and the majority) of plugins didn’t have any problems at all. And it is very likely that most of the solutions are just one or two searches away (or close). There is even an official Plugin Compatibility list on WordPress Codex.
How about you?
Did you upgrade? If so, how did it go? If not, what are the reasons for not doing it yet?