3. Upload the Files and Set Up the Database on the New Server (Plesk Example)
Now that we have the site data, we’ll move everything to the new server. This involves uploading the WordPress files and importing the database into a new MySQL database. We’ll illustrate this with a Plesk control panel scenario, but the general steps apply to any host (for cPanel, the workflow is similar.
Upload WordPress Files: Connect to the new server via FTP/SFTP or use the Plesk File Manager. In Plesk, navigate to your domain’s File Manager (under Websites & Domains) and open the web root directory (usually httpdocs
in Plesk for the primary domain). If this directory already contains a default Plesk page or an old site, you can delete those files (be very sure you no longer need them before deleting). Then upload the WordPress files you downloaded. You can either upload the zip archive (if you made one) and use Plesk’s extract function, or upload the folder structure as-is. Plesk’s File Manager allows multi-file upload and zip extraction, which can be convenient. If using FTP, simply transfer the files from your local folder to the httpdocs
(or appropriate) folder on the new server. After upload, ensure that wp-content, wp-admin, wp-includes, and all the files (like index.php
, wp-config.php
, etc.) are present in the new server’s directory.
(If you uploaded a zip via File Manager, select it and click “Extract Files” to unpack the WordPress files into the folder. All the WordPress PHP files and subfolders should now be in place. You can then delete the zip to clean up.)
Create a New Database in Plesk: Next, set up a database on the new server for WordPress. In Plesk, go to Websites & Domains > Databases. Click Add Database to create a new database. Provide a name for the database (for example, mysite_wp
– it’s useful to include something identifiable). Plesk will also ask you to create a database user and password with appropriate permissions for this DB. Choose a strong password and note the username, password, database name, and the database host (usually localhost
for Plesk MySQL). These details will be used in the wp-config.php
soon.
In Plesk, create a new database by clicking Add Database. Set a database name and credentials for a new user. This will prepare an empty database for your WordPress site.
With an empty database created, we need to import the old site’s data into it. Plesk offers phpMyAdmin integration: find your new database in the list and click the phpMyAdmin icon or link next to it. This opens phpMyAdmin for the new (empty) database. In phpMyAdmin, go to the Import tab. Use the file selector to browse for the SQL file you exported earlier.
(if it’s zipped, upload the zip – phpMyAdmin can handle compressed imports in SQL, zip, or gzip formats). Then click Go to run the import. This will execute all the SQL commands from your backup and populate the new database with your WordPress tables and data. You should see a success message or at least no errors once it finishes. (If the SQL file is very large and your phpMyAdmin/host has upload limits, you might need to split the file or use command-line MySQL to import it. Alternatively, some developers use WP-CLI: e.g., wp db import backup.sql
if WP-CLI is available on the new server.)
After importing, verify that in phpMyAdmin you can see the WordPress tables (like wp_options
, wp_posts
, etc.) in the new database. All the content from the old site is now in this database.
At this stage, your files and database are in place on the new server. The site isn’t functional yet because we need to configure WordPress to use the new database and possibly adjust URLs. We’ll handle that next.
Discover more from TechBooky
Subscribe to get the latest posts sent to your email.