At this point in the WordPress migration class, we've migrated our WordPress Database and our WordPress Application Files. The next step we need to do is update our WordPress configuration file so that the application files can communicate with the database to make your site come alive. Again, this is not as hard as it sounds.
Earlier, we asked that you use the MySQL Database Wizard to create a database, create a database user, and assign that user to the database with all privileges. We also asked that you write this information down as it would be needed later.
The following steps will take you through updating your WordPress Configuration file:
In our previous example, we created the following MySQL credentials:
Our cPanel username is whhsup5, and as you can see from the above cPanel automatically adds this prefix to all database names and usernames.
The database credentials that WordPress uses to connect to your database are contained within the wp-config file. What we'll need to do is find the files and simply change them. Start off by finding this section within the wp-config.php file:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'userna5_wp1');
/** MySQL database username */
define('DB_USER', 'userna5_wp1');
/** MySQL database password */
define('DB_PASSWORD', 'passwordgoeshere');
/** MySQL hostname */
define('DB_HOST', 'localhost');
Take a look carefully at the above code, and you should see that this file is define what the database name, username, and password are. The value 'localhost' is very commonly defined as the host, and the average user does not need to change this. After you find this section, update the values accordingly. In our example, the new changes will look like this:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'whhsup5_wpress');
/** MySQL database username */
define('DB_USER', 'whhsup5_wpuser');
/** MySQL database password */
define('DB_PASSWORD', 'passwordgoeshere');
/** MySQL hostname */
define('DB_HOST', 'localhost');
After you've made the above changes, click the "Save Changes" button in the upper right.
With one more step to go, we're almost done with the WordPress Site Migration! Continue to the next article to learn how to test your work.
70 Points
|
2012-04-02 12:28 am
I love the straightforward step-by-step instructions with reminders of what we're working on and where we are in the process.
Might be nice to include a troubleshooting link afterward; my migration isn't working, and I may have done something wrong before or while consulting these instructions. Thank you for making it clear and simple. LFiggs |
Staff 13,688 Points
|
2012-04-02 7:57 pm
Hello LLFiggs,
Thank you for the compliments on our tutorial. There are many possibilities when it comes to WordPress errors and troubleshooting. I'm sorry you're having trouble with your migration. I tested your site and I'm not seeing any errors. If you are still experiencing an issue with your site, please feel free to submit a question in the Support Center and give us any error messages you are seeing, where you are seeing them, and steps to recreate the errors. We'll be happy to help you resolve those. Regards, Christi N. |
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: |
877-595-4HUB (4482) 757-416-6627 (Intl.) |
Chat: | Click To Chat Now |
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!