Tuesday, January 12, 2010

WORDPRESS: NextGEN Gallery Not Function after Upgrade!

My Case:
I upgrade Wordpress 2.7 to wordpress 2.9.1.
The I also upgrade all plug-in that we use in the wordpress includes NextGEN Gallery.

All the previous pictures and gallery still there but the slideshow not working in publish news page.

  1. Download JW Image Rotator from here.

  2. Unzip and copy the Imagerotator folder in uploads folder.
    Default path is ../wp-content/uploads/

  3. Open the NextGEN Gallery admin panel page. Setting back the NextGEN Gallery Options. Compare the details with the previous gallery setting to get the same effect.

  4. Save all setting. Try refresh the page again. It' s done.


WORDPRESS: How to solve ‘You do not have sufficient permission to access this page.'

Case 1:
We install the same wordpress file in new server.
But we change the prefix of the database. After setup everything, the website page cannot be display. Error occur.

  1. Open database that have been use for this wordpress using phpmyadmin.
  2. Search url: www.address.edu.my dalam db
  3. Change all address to new address :www4.address.edu.my
    Probably inside:

  4. But after change all the address to the new one, the admin page cannot be open.
    There some error said:'You do not have sufficient permission to access this page.'

How to solve ‘You do not have sufficient permission to access this page.'

After seacrhing all the possible solution from the internet, finally we found the solution in this site: http://beconfused.com

Because we change the prefix of the table names in WordPress after the migration, thats why the error occurs.

In my old database, I used ‘wp_’ as my prefix. As I migrated, I decide to use ‘newprefix_’ instead of ‘wp_’. Unfortunately, the meta_key values are tied down to:
  • wp_user_level
  • wp_capabilities
  • wp_autosave_draft_ids
So, we need to update it to
  • newprefix_user_level
  • newprefix_capabilities
  • newprefix_autosave_draft_ids

The following statements go to ‘meta_key’ and does a string replace from ‘wp_’ to ‘prefix_’.

UPDATE `prefix_usermeta` SET `meta_key` = REPLACE( `meta_key` , 'wp_', 'prefix_' );

(** Dont forget to do backups first! Note that the quotes used for string and field name are different. )

Not finish yet! This another one statement you need to do also.

In the options table, there is ‘wp_user_roles’, make sure you get that changed into ‘prefix_user_roles’.

UPDATE `prefix_options` SET `option_name` = 'prefix_user_roles' WHERE `option_name` ='wp_user_roles' AND `blog_id` =0;

Try it, I tried logging in again and it worked. Thank you very much to http://beconfused.com

After successfully open the admin page, we run the upgrade automatically after deactivate all the current active plugins. All run very well without error.

But after check back all the links inside the website page, we found this error again:

WordPress 404 Not Found Problem

I already post this solution in my last year post. Refer the solution there.

After that, every links can work fine. Alhamdulillah...