You must first backup your website's files and folders that are held with a different hosting provider. There are a variety of plugins you can use to do this for you, however, to transfer your website, a more manual approach is required.
- Using an FTP program (e.g. FileZilla), connect to your web host using the FTP details they will have provided you. If you're not sure of what these are, please contact your existing web host
- Copy all of the files under your website's directory and paste them into a new folder on your local computer (e.g. create a folder on your desktop called 'website transfer')
- You must include the file called .htaccess which can sometimes be hidden, if this is the case, please refer to your FTP program's help guides to have it display hidden files
- Depending on how large your website is, this process could take some time, so don't panic if it does
Step 2: Exporting the WordPress Database
Exporting your database is a process whereby your existing WordPress database is taken from your existing web host, ready to move to Divine Computers.
- Login to your web host's cPanel account and open the phpMyAdmin application
- Select the database that contains your WordPress installation from the list on the left hand sidebar
- Once selected, click on the export tab on the navigation menu
- Click the 'go' button to begin the export process
- Files will be downloaded to your local computer
Step 3: Created the WordPress Database with Divine Computers
The next step is to create the WordPress database on your new web hosting provider (Divine Computers) where we'll create an environment ready to use for WordPress.
- Login to the Divine Computers cPanel (login details will be provided in your welcome email)
- Open MySQL Databases
- Type a name for your new database and click 'create database'
- Scroll down to MySQL Users and create a new user with a secure password
- Select 'add user to database' and click add, ensuring you grant the user all privileges
- Make a note of your database name and your MySQL username and password
Step 4: Edit the wp.config.php file
- Navigate to the folder on your local computer where you downloaded your website's files to
- Within the folder, there is a filed called wp-config.php
- Make a copy of the wp-config.php file and store it in another folder locally on your computer
- Open the original version of the file with a text editor (e.g. Notepad, Notepad++, Sublime Text)
- define('DB_NAME', 'db_name'); The 'db_name' will be the name of your old MySQL database, so you need to change these to your new MySQL database name that you created in step 3
- The next line to locate is: define('DB_USER', 'db_user'); The'db_user' will be the name of your old username of your old web host, so this needs to be changed to your new username created in step 3
- The final line to locate is: define('DB_PASSWORD', 'db_pass'); The 'db_password' will be the name of your old password of your old web host, so this needs to be changed to your new password created in step 3
- Save the wp-config.php file and close the file
Step 5: Import your Database
Now that you've saved your old files and create a template for your new database, we need to import the files to ensure the database works.
- Login to the Divine Computers cPanel and launch phpMyAdmin
- Select your database from the list on the left hand sidebar
- Once the database opens, select the import tab from the navigation menu
- In the 'file to import' section, click the 'choose file' option and select the SQL file you exported from your old web host
- Ensure you un-tick the 'partial import' box
- Ensure the format is set to SQL and click go
- The time it takes your database to import will differ depending on the size of your database
- Once the process is complete you'll receive a message to confirm the process was successful
Step 6: Upload the WordPress files to your new host
Your database is now prepared and the wp-config.php has been reconfigured, so now you can upload your website's files
- Connect to FTP using your new web host's credentials
- Locate the folder that your website is going to be saved under (if you are only hosting 1 website, this will be the public_html folder
- With the remote directory selected, upload your website's files from your local computer which will include an updated version of your wp-config.php
- Remember, this process can take some time
- Do not delete the files from your local computer
Step 7: Linking to your new URL
One of the issues people tend to have is that they move their website from one provider to the next, but their links to other posts on their website, or images that have been inserted directly, will likely break when their website is transferred. It would be worthwhile finding a search/find & replace database script on the internet to do this for you, remembering to delete it when you're finished, and you run the search/find & replace on your new domain you are transferring your website to.
- When you perform a search/find & replace by replacing your old domain with the new domain you will be altering the site_url and other values in the database
- This will ensure that when you login to your site on the new domain, you won't be redirected
Step 8: DNS transfer
We do have a guide on this section in more detail, but you'll need to remember that once you've transferred your database and your domain name (if required), the DNS transfer can take some time (up to 48 hours).