I migrated my WordPress install and DB to another server (same domain). And I am getting this:

enter image description here

Also everything is where it should be (including file and db permissions and other specific settings):

enter image description here

And I can not just get pass this:

enter image description here

And I can also confirm that everything works just fine with a blank new install. But I need to recover the current DB. Where should I start? What additional info should I provide to you guys?

EDIT 1: Errors info as requested. enter image description here

enter image description here

EDIT 2 Running Standard WordPress Database repair. enter image description here

EDIT 3 More awkward bugs.

enter image description here

enter image description here

  • did you do a search replace on the SQL file to change URLs? And did you change the wp-config.php to use the new database credentials? Also, can you show us the database errors in that screenshot? All the useful parts are cropped out
    – Tom J Nowell
    Aug 28, 2017 at 23:33
  • Yes, yes, yes its written: WordPress database error: [Unknown collation '#224' in table 'liwys_options' definition] Aug 28, 2017 at 23:39
  • WordPress database error: [Table 'liwys_users' already exists]. The only two errors. @TomJNowell Aug 28, 2017 at 23:42
  • Have you downgraded mysql to an older version on the new server? Note that you can't just open the sql file in a text editor and change the URL via search replace, it'll mangle any serialised PHP present generating problems. You have to use a dedicated search replace tool such as WP CLI to do the change
    – Tom J Nowell
    Aug 29, 2017 at 2:05
  • @TomJNowell No I did not downgraded mysql to an older version on the new serve. Any Idea how to do it? Aug 29, 2017 at 9:26

4 Answers 4


You didn't mention what have you done so far to migrate your installation, but I'm going to write the full procedure.

Backing Up the Old Database

You need to create an exact duplicate of your database, to transfer it to your new server. There might be an encoding issue here, so to do this, login into your panel's PhpMyAdmin, and then:

  1. Select the database's name from the left sidebar
  2. Click the Export button on the top navigation menu
  3. Click Custom under export method
  4. Click Select All under the tables
  5. Choose UTF-8 as encoding, as stated in the screenshot below

Exporting WordPress database

Now you can export and save the file.

Restoring the Back-up

To restore the backup, you should first create a database with the same name of your previous database. After you did so, choose it from the left sidebar, and click Import from the top navigation menu. Choose the file by clicking the browse button, and then set the encoding to UTF-8.

Click Import to finish the importing (don't forget to remove any existing tables first).

Editing wp-config.php

After importing the database, you need to modify the wp-config.php file. If you don't do this, you will be redirected to an installation page, this is why you are getting "Table Exists" error instead of directly being redirected to wp-login.php.

These 4 lines need to be modified to match your new database's configuration:

/** The name of the database for WordPress */
define('DB_NAME', 'database_name');

/** MySQL database username */
define('DB_USER', 'username');

/** MySQL database password */
define('DB_PASSWORD', 'password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

If you do this properly, you will be redirected to wp-login.php after you try to access /wp-admin/.

Updating the URLs

If you have also changed your domain's address, you need to take 2 further steps. First, you should update the core URLs for your blog's home page. To do so, open the wp_options table in PhpMyAdmin, and modify the siteurl and home values to match your new domain. These are the first two options.

Afterward, you have to do a full search and replace in your database to update the old URLs. Since there are serialized data in the database, you should avoid doing this by a plain text editor. Instead, use a plugin such as Better Search Replace.

Head over to Tools > Better Search Replace, and replace old.com with new.com. Pay attention to spelling and letter cases, this can matter a lot. If you are switching to HTTPS, you should replace http://old.com with https://new.com.

A Final Note

I would also use the same WordPress version on the old server for migration. After migrating, you can update to the latest version in the admin panel.


I always find it easiest to use the WP Clone plugin https://wordpress.org/plugins/wp-clone-by-wp-academy/ . Very easy, takes care of all the manual work, and works every time.

Just install on source and target systems (same WP version, of course). Backup the source, restore to the target. Done.

You can do it manually. But it takes some skill and perseverance. I just use the WP Clone plugin because it works...and I am too lazy to do it the hard way.

  • Well unfortunately I can not boot the old server at all (only in safe mode) and there I have the same problem (WordPress on localhost, with all fixes). Therefore I can not run any plugins at all. :/. Actually this is the main reason behind the migration Aug 29, 2017 at 9:25
  • If you have phpMyAdmin access, you should be able to update/change the db credentials. Then use those credentials in the wp-config.php file. You might rename the wp-content/plugins folder to something else to temporarily disable all plugins. The point is to get admin access. You might also try manually FTP a fresh WP copy from local computer, changing the wp-config.php file (or not copying that file). Once you get admin access to a basic site, you can copy plugin folders to a new wp-content/plugins folder, then activating. Aug 29, 2017 at 18:52
  • If the 'target' system is fully borked, but your 'source' system is OK (content, etc), you could just blow away the entire 'target' WP folder and install a fresh/new WP. Then install the WP-Clone plugin on source and target, and backup source and restore target. Depends on whether target system is (or was) 'live'. You might check if the hosting place has an older backup to restore entire site + databases. Aug 29, 2017 at 18:55

Changing your WordPress database collation might fix your issue. You may open your wp-config file and find this part

define( 'DB_COLLATE', '' );

Through this, you can let wordpress use the collation that might work for your based on your database.

For reference : https://codex.wordpress.org/Converting_Database_Character_Sets

Inmotion :http://www.inmotionhosting.com/support/website/wordpress/database-collation


When migrating a Wordpress website you must use a plugin if the url changes in anyway. The reason for this is the some data is stored in a serialized array. The data must be un-serialized, url changed, and then re-serialized. Always export the database using a plugin from inside the CMS for best results. I always use:


It always works. If you simply do a search and replace on your database and do not take into account serialization you will break the site.

Update: You can use tools to migrate the DB outside of Wordpress as long as they perform the un-serialize and re-serialize function when doing a search and replace.

  • The first part of this answer isn't true. You don't need a plugin. I search and replace with db tools outside of wordpress so I don't have to worry if there are plugin/theme/version conflicts that could cause problems.
    – rudtek
    Sep 12, 2017 at 22:15
  • Yes this is true, as long as they perform the un-serialize and re-serialize function you don't need a plugin. Sep 15, 2017 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.