Guide: How to import a WordPress database?
Before You Start the Import
Make a backup of the current database and check the file format. Most commonly, you'll be importing an SQL file or a compressed SQL file. Make sure you've selected the right database, that it has the correct encoding, and that it doesn't already contain data from another live site.
A large file can exceed the phpMyAdmin upload limit. In that case, you can split the import into parts, use a command-line tool, or ask support to handle it for you. Don't refresh the page repeatedly while an import is in progress.
- a backup of the database before making changes
- the correct database name and username
- matching character encoding
- checking the SQL file size
Checking WordPress After the Import
Check the wp-config.php file, the table prefix, and the connection details. If the domain has changed, the site address may need to be updated in the database. After logging in, check your subpages, media, forms, and direct links.
A database connection error usually means an incorrect database name, username, password, or host. A white screen or a PHP error can be caused by a plugin conflict or a PHP version mismatch rather than the import itself.
Database Import as Part of a WordPress Migration
Importing the database is one of the key steps in moving a WordPress site. After the import, you need to check the connection details in the configuration, the site address, login to the admin panel, and whether forms and the cart still work if the site uses WooCommerce.
In Plesk, you can combine the database import with uploading files, changing the PHP version, and enabling SSL. WordPress Toolkit then helps you keep the installation updated and secure.
