Tips on Creating Database for Importing Backup
When installing a site with Duplicator, you need to create a database or connect to an existing one.
Below are several options to set up the database. For a full walkthrough of every screen in the installer, see The Ultimate Guide to the Installer.
Creating a new database
Option 1: Using Your Host’s Control Panel
- Create a new database and note down the database name.
- Create a new database user or assign an existing user to the new database. Ensure this user has full permissions for the database, and note down the username and password.
- Open the
installer.phpfile generated by Duplicator and use these credentials to test the connection to the new database. If successful, proceed with the installation.
Option 2: Using Duplicator’s Database Creation Tool
- On Step 1 of the installer, select the option for
Create New Databasefrom the Database Action dropdown. - Enter the name of the new database you want to create.
- Provide the name of an existing database user with the necessary permissions.
Option 3: Duplicator Pro with cPanel Integration
- The cPanel integration will use the cPanel API to create a new database and user.
- Select the database and user from the dropdown boxes that appear.
Connecting to an existing database:
Option 4: Overwrite Mode
- Overwrite Mode is used when you place the
installer.phpand archive file (.zipor.daf)into a directory where WordPress already exists. - This mode allows you to overwrite the existing site’s database and files with the database and files of the backup.
- During the installation, you’ll see the existing database and user details. Confirm these details and click Apply to use the existing database settings.
Option 5: Importing to the Same Site
- When you import a backup onto the same site it was created for (rather than a different site), the installer reuses that site’s existing database settings automatically instead of asking you to enter them. See Importing a Backup using Duplicator Pro for the exact steps and which Install Type to select.
Video Resources
Follow Along Step-By-Step (starting @ 14:30 of 24:57)
How to Set Up Database in cPanel
Once your database is set up and the installer confirms the connection, move on to the rest of the installation. See The Ultimate Guide to the Installer for what comes next.