pdunbar
pdunbar

Reputation: 39

Wordpress pages do not appear after transfer to new host

Somewhat of an amateur here: I moved a wordpress site from one host to another. This involved me backing up the old site, and uploading all of the material from the wp_content folder into the wordpress installation on the new site via FTP. When I log into wp-admin, I can see the transferred plugins and themes, but not the pages. I'm guessing this has something to do with me needing to properly edit the wp-config file to point at the correct database. The database is currently sitting in the wp-content folder and simply called 'database.sql'. Could someone kindly explain where this database should sit, what it should be called, and what updates I need to make to the wp-config file please?

Upvotes: -1

Views: 105

Answers (2)

Sandeep Singh
Sandeep Singh

Reputation: 11

You need to import the database file in phpmyadmin.

First create database in MySQL in your hosting Then Create new user and link with database now open PhpMyAdmin and click on database that you created and import database backup file in it using import option. And finally change db name and user name & password in config.php file.

Upvotes: 0

ERM
ERM

Reputation: 32

At this point, as you said being an amateur, I think the easiest way for you to migrate a website from one host to another is using a plugin, which makes the migration way easier. Try something like - All In One WP Migration, or Duplicator plugin

Besides that it seems that you have not migrated the Database. Just migrating the wp-content folder does not do the job.

I assume you already have an working application in the server. You need to do the following:

  1. Locate the phpMyAdmin or a db manager in you hosting website.

  2. Create a new database(name, username, password and host(usually localhost). Save those values because you need to edit them later in wp-config.php file.

  3. In phpMyAdmin select the db and find the import tab and upload the database.sql file you had.

  4. Now you should edit the wp-config.php file of your new wordpress installation directory. This meaning updating the following lines:

    define('DB_NAME', 'your_database_name'); // Replace with the new database name

    define('DB_USER', 'your_database_user'); // Replace with the new database username

    define('DB_PASSWORD', 'your_database_password'); // Replace with the new database password

    define('DB_HOST', 'localhost'); // Replace if the database host is different

  5. Sometimes the URL also need updating in database. Test, if it needs, then go to phpMyAdmin and open the wp_options tabe, look for the rows with option_name values of you siteurl and update their value to match your new site's URL.

Let me know if this works for you or you need some more information.

Upvotes: 0

Related Questions