How to import WordPress site to new WordPress site?

As you did not state any details about the environment of if you are adding to a remote host or localhost – I’ll write the steps required to clone an install on a local environment on Windows using XAMPP from a zip of the database and wp-content files – the process is similar in both cases, but each host has their own set-up and panel, so some steps would be different.

  1. Create a new database user inside phpmyadmin – check the options to create a database with the same name and grant all access options to this new database – store the details you enter as you’ll require these for the wp-config.php file to grant WP access to this database.

  2. Go to your new database and select the import tab – find your local .sql file and select this and run the import option – check phpmyadmin for any errors and try to address them.

  3. Download the latest version of WordPress – unzip to the location on your local htdocs that you want this install to be.

  4. Edit your hosts and http-vhosts.conf files to set-up and local aliases pointing to your new install location.

  5. Copy the entire wp-content folder from your old install to the same location in the new install – overwrite everything as it is all generic

  6. Edit the wp-config.php in your new install to include the DB connection details you stored earlier

  7. This step is a little tricky, but the site_url and home_url values have probably changed, so you will need to edit these directly in the wp_options table of the new database – these are usually on the first and second page of rows – you can click and edit the value in place with modern version of phpmyadmin

  8. Open the wordpress admin in your browser – based on what you added to your vhost and wp_options table – if you remember your user credentials, login and check if it all works…