Migrate/Importing a WordPress installation

To migrate a WordPress site, follow the steps below:

Exporting the mySQL database

1. You will need to know the name of the database, which can be found in your wp-config.php file. Locate the lines shown below:

/* MySQL settings */
define( ‘DB_NAME’, ‘database_name’ );
define( ‘DB_USER’, ‘username_here’ );
define( ‘DB_PASSWORD’, ‘password_here’ );
define( ‘DB_HOST’, ‘localhost’ );
define( ‘DB_CHARSET’, ‘utf8’ );

database_name will be the database name. The format will always be with your cPanel username_databasename

2. From inside of cPanel, navigate to phpMyAdmin.

3. Once inside of phpMyAdmin, click on your database located on the left side. Note: If you have multiple databases, you will see the option to expand your username using the + symbol.

4. Once clicked on your database to migrate, you’ll see all of the tables shown in the right pane. At the top, you’ll click “Export”.

5. After clicking export, you’ll see a radio button selected for “quick” – if it is not, please click it. After, click the “go” button. You’ll then have the option to save the .sql file to your desktop or another folder.

Downloading the WordPress files:
1. You will need to navigate to where your WordPress installation is located and copy/download to following files/directories:

DIRECTORIES:
wp-admin
wp-content
wp-includes
FILES:
.htaccess
index.php
wp-activate.php
wp-blog-header.php
wp-comments-post.php
wp-config-sample.php
wp-config.php
wp-cron.php
wp-links-opml.php
wp-load.php
wp-login.php
wp-mail.php
wp-settings.php
wp-signup.php
wp-trackback.php
xmlrpc.php

Importing the database into your new hosting account (or new cPanel account)

1. Create the new database & user
In your cPanel account where you wish to put the new WordPress install, you’ll want to create a new database using the information found in step 1 from your wp-config.php file – database_name (only enter the second part after the underscore). You’ll add this from cPanel > mySQL Databases.

After creating the database, you’ll need to assign a user to it. To add a user, scroll down towards the bottom where you created the database at and you’ll see the option to create a user. You’ll want to use the same username found in the wp-config.php file or create a new one if one doesn’t exist. (username_here – you want to use the value after the underscore). Enter a password (make sure to note the password) and add.

After adding the user, you’ll see the option for permissions – you want to select all permissions, then click add.

2. Upload the files that were downloaded above into the new installation directory – this is typically in the public_html folder. If you are installing in another directory, you’d upload the files into that directory.

After uploading, navigate into the wp-config.php file and locate the entries below:

/* MySQL settings */
define( ‘DB_NAME’, ‘database_name’ );
define( ‘DB_USER’, ‘username_here’ );
define( ‘DB_PASSWORD’, ‘password_here’ );
define( ‘DB_HOST’, ‘localhost’ );
define( ‘DB_CHARSET’, ‘utf8’ );

You will need to edit the variables above to reflect the database name, username & password we created previously.

Import the new mySQL database

For this, you will repeat the steps in reverse that we took to export the database:

1. In phpMyAdmin, highight the new database your created. You’ll see there will not be any tables on the right.

2. At the top, click “Import”. You’ll see the browse button that will allow you to browse to a file. Click browse & locate the file you previously saved containing the .sql extension.

  • Migrate/Importing a WordPress installation
  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

How to show hidden files (.htaccess) in cPanel File Manager?

Many users ask us how they can see the .htaccess files for their websites in cPanel File Manager....

How Can I Compress / Uncompress Files Using the File Manager?

How to Compress Files Go to the File Manager. Navigate to the folder where the files you want...

How to View Your cPanel Disk Space Usage?

In order to view your cPanel disk space usage, there’s a great tool located inside of your...

Accessing webmail for your domain

To access the included webmail email clients included with your hosting account, you’ll need to...

How to rename a database in phpMyAdmin?

phpMyAdmin is a free and opensource application for MySQL database management. It is one of the...