- Log onto your host, open PHPMyAdmin and select to export the database
- Copy all web contents off either via FTP, or if using cPanel, zip up and download.
- Upload to the new file host via FTP or cPanel. If cPanel your life is as easy as upload zip and extract.
- Create a MySQL database on the new host.
- Open PHPMyAdmin on the new host and import the .sql file into the database.
- Modify the config.php file with the new database username, password and database location. Most of the time this will be 'localhost'. In the case of using fasthosts, you will have to enter the IP address of the database server. This can be obtained by logging onto the fasthosts control panel, opening you domain and selecting the databases option. To the right of your database name will be an IP address, use this in your config.php file.
Now onto the real problem.
After we imported the database and files, we attempted to go to the web site. We were then given the proverbial middle finger with a nice white blank page on one and a forbidden error on the second imported site.
The forbidden error message was due to a .htaccess file in the root directory that was imported. We removed this and then got our nice blank page back.
We next tried to go the admin page http://exampleurl/admin where we now had the option to try and logon. A step forward.
When logging on we were told we had the wrong username and password. Something was pointing to the fact that the database was wrong somewhere.
So what's the answer? Well after lots of swearing and testing, here is what you need to do to fix the problem.
- Open the config.php file and modify the line $config['dbms'] = 'mysql'; to read $config['dbms'] = 'mysqli';
- In case you didn't notice, we put the letter i after the mysql
- We could then logon to the admin page. From here we rebuilt the database.
- First, go to Site Admin > System Maintenance on the left hand side.
- From here, under the Database tab, select to both Optimize tables and Repair tables. as in the picture below
- Next click on the Cache and content tab and select to Clear Cache, and the click Update to both page hierarchy and Routes buttons.
So how do you solve a blank page in a CMS Made Simple host migration?
Well in our case luck and an intense amount of clicking, but for you this simple little guide.
Hope this helps.
Did this guide help you. We'd like to know. Let us know your thoughts in the comments section below.