While installing a WordPress Blog into your Ausweb hosting account can be simply done using Fantastico Deluxe, there are some occasions where you want to transfer an existing WordPress Blog to your Ausweb hosting account. This may be because you already have a WordPress Blog hosted elsewhere and are changing hosting providers or you have a WordPress Blog that you have developed on a test server.

The process involves 4 steps

1. Delete spam comments from your database
2. Export (or dump) your existing MySQL database, then create a new database and import the data.
3. Upload your existing WordPress Blog files to your hosting account.
4. Change your WordPress Blog configuration settings.

Before starting this process it is a good idea to backup your existing site and database, just in case there is a problem.

Deleting Spam Comments From Database

Login to phpMyAdmin and from the top menu select “SQL” which will open an input window. Into the text area that appears, type the following command and hit “Go”

Moving Your WordPress Blog

You can also use the above instructions to delete other unnecessary data from various tables that you don’t want to take with you.

Optimize The Database Tables

Again select your database in phpMyAdmin. Below the list of tables use the “Check All” to select all tables, then from the drop-down list select “Optimize Tables” and click “Go”. Your database is now optimized and ready to be exported.

Making a MySQL dump from the 1st site.

Log in to phpMyAdmin for the site you wish to export the existing MySQL data from Choose the database you wish to export from the drop-down list on the left. Select “Export” from the top menu. Click “Select All” so that all tables in the database are exported. Select “SQL” as the export type. The rest of the settings can be left at default as shown below

Moving Your WordPress Blog

A pop-up window will open in your browser, select “Save to Disk” then click “OK”

Moving Your WordPress Blog

You now have a MySQL dump of your 1st site’s WordPress database.

Importing the MySQL dump from the 1st site to the 2nd site.

Before the data can be imported, the database must be created and user privileges assigned to it

Login to your Ausweb account cPanel by pointing your browser to http://yourdomain.com/cpanel where “yourdomain.com” is your real domain name. You will then be asked for a username and password (this information is supplied in your welcome email). Now that you have logged into cPanel, click “MySQL Databases” from the list of options.

Moving Your WordPress Blog

Create your new database by entering the name (in this example “newdb”) and click “Create Database”

Moving Your WordPress Blog

Now we need to create a user that can be assigned to the database. Enter the username and password you wish to use then click “Create User”

Moving Your WordPress Blog

Next add the new user to the database by selecting the user and the database from the drop-down lists, tick “All” privileges and click “Add User to Database”.

Moving Your WordPress Blog

Moving Your WordPress Blog

Now that we have created a new database and added a user with privileges we can import the dump file from the 1st site.
From your cPanel main page click “phpMyAdmin” Once in phpMyAdmin select the new database we just created from the drop-down list on the left.
Select “Import” from the top menu and browse for the dump file downloaded from the 1st site. Click Go to start the import process.

Moving Your WordPress Blog

Once the import process has been completed you will be shown a message that the import was sucessful and the number of queries executed.

Uploading Files To New Server

There are 2 ways to go about uploading the files. You can use FTP to upload all the WordPress files to your hosting account, but as there are a lot of files that make up a Joomla site, this can be a long tedious process.

The better option is to compress all the files and folders into a .zip or .gz file, this file can be uploaded to your hosting account and then unpacked/unziped/extracted depending on the file format.

Login to cPanel for you hosting account an go to File Manager.

  1. Upload the zipped file to your public_html (Main directory, subdirectory or subdomain) directory in File Manager, or use FTP (upload as binary).
  2. Click on the file name (not the icon this time) to select the file. A gz file
    Moving Your WordPress Blog
  3. Look at the menu on the right side. Click the link which says Extract File Contents. Extracting/unzipping/unpacking
    Moving Your WordPress Blog
    Moving Your WordPress Blog
  4. All files are unpacked, unzipped and placed in the same relationship as packaged. All folder names and contents the same.

Now that all files and folders are uploaded we need to check that file and folder permissions are correct. There are a number of folders that must be writable for WordPress to function. You can change folder and file permissions using either FTP or cPanel file manager.

To change the permission of a file or folder in cPanel’s File Manager

1. Select the file or folder you wish to modify on the left.

2. Click “Change Permission” link from the upper right corner.
Moving Your WordPress Blog

3. Set the options as shown below or type “755” then click “Change”
Moving Your WordPress Blog

Directories should have permissions of 755. NEVER 777
All files should have permissions of 644.
If you do want to use the built-in editor, theme files should have permissions of 666. NEVER 777

Change your WordPress Blog configuration settings.

Open the “wp-config.php” in your favorite text editor and change the MySQL database information (i.e. the database name, user, and password you created in the previous step).

define(‘DB_NAME’, ‘new-database-name’); // The name of the new database

define(‘DB_USER’, ‘new-user-name’); // Your new MySQL username

define(‘DB_PASSWORD’, ‘new-password’); // .Your new password