Drupal to WordPress migration notes

These Drupal to WordPress migration notes are intended for clients who are handling some aspects of the migration themselves. Users of the Drupal to WordPress Migration Tool or MySQL queries might also find information here to resolve some problems.

Admin account password and email address

Your content management system (CMS) administrator password and email address may have changed during the migration to help with debugging. Please update them as soon as possible.

Drupal and WordPress user passwords are encrypted and I do not have access to them in plaintext. However, for your peace of mind, I recommend that you also ask all your users to reset their passwords.

Server credentials

Please remember to change any database, (S)FTP, SSH server and control panel credentials you may have given me.

Working tables

During the migration process, I may create some working tables to hold temporary data. My naming convention for the working tables are as follows:

  • acc_ prefix: these are working tables created to help with migrating data.
  • backup_ prefix: these are backups of existing tables prior to migration, for example from a previous installation of your CMS. These will not be altered during the migration process.
  • _copy postfix: duplicates of WordPress tables copied for debugging will have a _copy postfix. These are different from the backup_ tables in that they may have been manually altered.

These working tables are not used by WordPress so you may safely delete them. However, it’s advisable to keep them for a short while as they may be useful in case we need to debug any issues that crop up.

Migrating to a live server

Most Drupal to WordPress migrations are performed on a test or development server. For help on how to move WordPress to your live server, please see: WordPress Codex: Moving WordPress.

Troubleshooting common errors after a site migration

Please see below for some common problems you may experience after migrating your Drupal content to a new WordPress site.

Incorrect domain in URLs

WordPress stores domains in the database. If you performed the migration on a local or development server, there’s a good chance that the links will be incorrect after migrating to your live server. Use the Interconnect IT utility to run a search and replace on your database. This will also correct changed database prefixes.

More information can be found on the interconnect/it Search Replace DB page.

“Sorry, you are not allowed to access this page”

If you try to log in via wp-admin and receive this error, you may have overwritten the administrator user’s wp_capabilities or wp_user_level.

Set the correct meta_value using the following SQL:

UPDATE wp_usermeta 
    SET meta_value = 'a:1:{s:13:"administrator";s:1:"1";}'
    WHERE user_id = 1 AND meta_key = 'wp_capabilities';

UPDATE wp_usermeta 
    SET meta_value = '10'
    WHERE user_id  = 1 AND meta_key = 'wp_user_level';

Remember to use the appropriate the user_id.

“You do not have sufficient permissions to access this page”

If you receive this error after logging in to your new WordPress installation, it’s possible that the database prefix on your new WordPress site is not set correctly. This may happen if you move your WordPress installation to a host that uses a different database prefix.

Try running one of the queries below. Replace wp_new_usermeta, oldprefix_ and newprefix_ as appropriate.

Option 1:

UPDATE wp_new_usermeta SET meta_key = REPLACE(meta_key,’oldprefix_’,’newprefix_’);

UPDATE wp_new_options SET option_name = REPLACE(option_name,’oldprefix_’,’newprefix_’);

Option 2:

update wp_new_usermeta set meta_key = ‘newprefix_usermeta’ where meta_key = ‘wp_capabilities’;

update wp_new_usermeta set meta_key = ‘newprefix_user_level’ where meta_key = ‘wp_user_level’;

update wp_new_usermeta set meta_key = ‘newprefix_autosave_draft_ids’ where meta_key = ‘wp_autosave_draft_ids’;

update wp_new_options set option_name = ‘newprefix_user_roles’ where option_name = ‘wp_user_roles’;

Please note that these queries may not work for you. Success depends on your specific setup.

For more information, please see the following pages:

“Unable to establish database connection”

The database credentials are correct but you see an “Unable to establish database connection” error. Check that wp_options table is not empty.

Allowed memory size exhausted

  1. Increase php.ini memory size
  2. Increase WP settings memory limit with:
    define(‘WP_MEMORY_LIMIT’, ‘128M’);

Post migrated but navigating to post shows blank page

The post is visible in the dashboard but viewing it displays a blank (but themed) page. Manually saving it on the dashboard makes it appear.

It’s possible that the problem posts need to be assigned to a category.

Post migrated but navigating to post shows ‘Not found’ error

The post is visible in the dashboard but viewing it displays a ‘not found’ error. Manually saving it on the dashboard makes it appear.

  1. Check that the url contains valid characters for a WordPress slug.
  2. Check that .htaccess is enabled in your Apache configuration

Link to author 404

Posts exist but link to the author’s post listing page is broken.

Check user_nicename in wp_users WordPress table. Make sure the nicename doesn’t contain invalid characters such as spaces, periods.

Dashboard controls not visible after logging in

If you are able to log in as an administrator user but do not see the Dashboard controls, check your table prefixes. If the table prefixes changed during the migration, you may have forgotten to update the options and usermeta tables.

Check where the old prefixes have been set:

SELECT * FROM `wpnew_options` WHERE `option_name` LIKE '%wp_%';
SELECT * FROM `wpnew_usermeta` WHERE `meta_key` LIKE '%wp_%';

Updated the prefixes. For example:

UPDATE `wpnew_options` SET `option_name` = 'wpnew_user_roles' WHERE `option_name` = 'wp_user_roles';
UPDATE `wpnew_usermeta` SET `meta_key` = 'wpnew_capabilities' WHERE `meta_key` = 'wp_capabilities';
UPDATE `wpnew_usermeta` SET `meta_key` = 'wpnew_user_level' WHERE `meta_key` = 'wp_user_level';

UPDATE `wpnew_usermeta` SET `meta_key` = 'wpnew_user-settings-time' WHERE `meta_key` = 'wp_user-settings-time';
UPDATE `wpnew_usermeta` SET `meta_key` = 'wpnew_user-settings' WHERE `meta_key` = 'wp_user-settings';

Further help

We’ll be very happy to provide support you if have difficulties after migration. For a quotation, please contact us. We also offer customised hosting and maintenance packages. Please ask for details.

Scroll to Top