---
title: "Configuring WordPress After a Migration"
description: "So far in this tutorial you have migrated your WordPress database and copied the files associated with your website. The next step you will need to configure your WordPress settings so the files you..."
url: https://www.inmotionhosting.com/support/edu/wordpress/configuring-wordpress-after-a-migration/
date: 2011-08-31
modified: 2026-04-23
author: "InMotion Hosting Contributor"
categories: ["Website Transfers", "WordPress Hosting", "WordPress Tutorials"]
type: post
lang: en
---

# Configuring WordPress After a Migration

So far in this tutorial you have [migrated your WordPress database](/support/edu/wordpress/migrating-your-wordpress-database/) and [copied the files](/support/edu/wordpress/migrating-wordpress-files/) associated with your website. The next step you will need to **configure your WordPress settings** so the files you just migrated can communicate correctly with the database. Until you perform this, your site will not display any content and you will receive a [database connection error](/support/website/is-mysql-available/).

A few steps ago in this tutorial we asked you to write down the *database name*, *username*, and *password*. Now, we will need this information to continue the migration process.

![Configuring WordPress After a Migration](https://i.ytimg.com/vi_webp/-gtUGA_lmsE/maxresdefault.webp)

## Opening the wp-config.php file

1. [Log into your cPanel account](/support/edu/cpanel/how-to-log-into-cpanel/).
2. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2012/03/cpanel_file-manager-paper-lantern.png)](/support/wp-content/uploads/2012/03/cpanel_file-manager-paper-lantern.png)Click on **File Manager** located in the *Files* section of cPanel.
3. Make sure you are able to [view hidden files](/support/website/show-hidden-files-in-file-manager/).
4. Navigate to the the folder to where you [uploaded](/support/website/how-to-upload-files-server/) *WordPress*.
5. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2011/08/cpanel_wp-config-paper-lantern.png)](/support/wp-content/uploads/2011/08/cpanel_wp-config-paper-lantern.png)Click the **wp-config.php** file, then click the **Edit** link on the top menu.

## Configuring the wp-config.php file

For the purposes of this tutorial we will say we created the database with the following database credentials:

- **Database name**: inmoti5_wpress
- **Database username**: inmoti5_wpuser
- **Database password**: secretpassword123

Our current cpanel username is *inmoti5* and as you will notice it automatically adds the prefix to database names and usernames.

| The database credentials that *WordPress* uses to connect to your database are contained within the *wp-config* file. What we will 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’, ‘**inmoti5_wpress**‘); /** MySQL database username */ define(‘DB_USER’, ‘**inmoti5_wpuser**‘); /** MySQL database password */ define(‘DB_PASSWORD’, ‘**secretpassword123**‘); /** MySQL hostname */ define(‘DB_HOST’, ‘localhost’); After you’ve made the above changes, click the **Save Changes** button in the upper right. There are only a couple of steps left to migrating your *WordPress* site. In the next tutorial we will discuss how to correct image links from your posts and pages. |
| --- |

Please check the next article on [Correcting image links after a WordPress migration](/support/edu/wordpress/correct-image-links/). If you missed our previous article, please see the [Migrating WordPress Files](/support/edu/wordpress/migrating-wordpress-files/) tutorial. For more information on this course please visit [Migrating your Existing WordPress site to InMotion Hosting](/support/edu/mediawiki/make-changes-to-mediawiki-skins/).
