In this final step, we edit the wp-config.php file located in your new WP folder location to reflect the new sql database.
- Use a text editor to open the wp-config.php file, located in your new WordPress site root directory and change the contents as follows to match the information you recorded earlier.
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'your_local_db_name); /** MySQL database username */ define('DB_USER', 'your_local_user'); /** MySQL database password */ define('DB_PASSWORD', 'password'); /** MySQL hostname */ define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');
- Save the file and then, if you are using a local MAMP server, restart your server.
Now test the following in your new site to ensure the migration has been successful.
- home page
- image URLs
- page and post URLs
- admin login