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
/wp-admin/upgrade.php
- 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 wp-config.php
file.
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.php
from your previous (2.3 or earlier) installation of WordPress, but rather edit wp-config-example.php
supplied with the WordPress 2.5, save it as wp-config.php
and 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”
Yet Another Related Posts is a very useful and smart plugin created by Michael Erlewine.
Due to the fact that this plugin uses a “dirty, dirty hack” to:
avoid a loop in
apply_filters('the_content')
>yarpp_default()
>yarpp_related()
>current_post_keywords()
>apply_filters('the_content')
. The code is straight up stolen fromwp-includes/plugin.php
and, with the exception of the single hack line below, should match what happens inplugin.php
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 require('../../wp-blog-header.php');
with require('../wp-blog-header.php');
.
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?
Thanks Kaspars,
I had the same problem with popularity contest but I just turned it off. I was planning to wait until it was upgraded but you have given me the solution. Nice one.
Andrew, it’s good you found this useful. It would be interesting to know if you experienced any other problems while upgrading or was it all smooth sailing?
I’ve just upgraded to 2.5 and never seen such an error.I don’t know why you got a wp-config error.I kept the previous one.
When I try to upgrade any plugins via the automatic method I get the following message:
“Upgrade Plugin
Downloading update from http://downloads.wordpress.org/plugin/(plugin-name).zip
Unpacking the update
Could not create directory”
Has anyone else got this? It seems that I can’t upgrade plugins automatically. If anyone knows of a solution I’d be very grateful.
John, I haven’t had this problem myself. Maybe you have the WP Automatic Update plugin installed? There are reports that it is causing error similar to the one you described.
Also you may try googling for wordpress 2.5 “Could not create directory”. Please let me know, if you do find a solution.
I also noticed that you have the Bad Behavior plugin enabled, which has been reported to cause problems with the new file uploader. I suggest that you disable most of the plugins and then try to do an automatic upgrade.
Kaspar, thanks for the answer. But it turned out to be a matter of permissions. The plugins directory wasn’t writeable, so I made it 777 and now it works. As you say, this is probably down to the WP Automatic Update which does mess with permissions.
Many thanks for the YARPP fix!
I have similar problem with you, and now it’s resolved. Thanks
WP Automatic Update also may fail for servers running with PHP safe mode option, see this post
Thank you so much for that. I needed to implement a theme change and the darn thing broke. I really appreciate you taking the time to work on this!