Moving Concrete5 from one web host to another.

Permalink 7 users found helpful
Directions for Moving a Concrete5 website from 1 host to another host.

This worked for me, I offer it as a guide, not a guarantee of success. This document assumes you are familiar with FTP programs and when I say download folder X, that you know how to do it. If you do not, learn and install an FTP client before trying this procedure. I use Filezilla for my FTP client.

Transfer Preparation:
1. Clear and turn off the Concrete5 Cache.

Login as admin>>Dashboard>>Sitewide Settings>>Debug Tab>>Clear Cache, Then Select Disable Cache>> Update Cache

2. Export database using the naming convention of the Target Host.

Example: newacctname_dbname

You do this by logging into your current/previous site control panel. I have cPanel for the current and target hosting companies.

Go to phpMyAdmin (at least this is in my control panel) >>Select the current database

Click Export tab along the top>>Select all tables>>Select SQL>>Check Structure plus check the items below it:

Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT
Add IF NOT EXISTS
Add AUTO_INCREMENT value
Enclose table and field names with backquotes
Add CREATE PROCEDURE / FUNCTION / EVENT

Check SAVE AS box at bottom and add the database name for your destination / target host

Example: newacctname_dbname>> compression none.>>GO

Save the newacctname_dbname.sql file to your local computer.

Close phpMyAdmin.

3. Download your current /Files and /Packages directory into your local computer. /Themes also if you put any there.

4. Transfer/Change Domain Name DNS to new host servers in your domain name control panel on the registrars web site.

Transfer Concrete5 Web Site

Your domain name may need to resolve before continuing to step 5. Continuing will depend on if you have ftp access before the domain name resolves.

5. Create / sign up for a hosting account OR log into the destination/target hosting account

6. ADD your domain to your account. I add it without the WWW’s.

7. Install Concrete5 to your domain. My target host has Simple Scripts installed. I am installing Concrete5 through Simple Scripts.

See Alternative installation below if you are not using something like Simple Scripts.

8. Create the database using the MySQL wizard using the same Database name, User name, password from your original concrete5 installation.

9. Import the database you exported in step 2 above. Open phpMyAdmin on the destination cPanel and import database into the one you created on the destination server. Browse for the database and click GO.

Close phpMyAdmin.

10. Download the site.php file from the /config/ folder (NOT the site.php from the /concrete/config folder). Alter the file to match your new database info. Re-upload the altered site.php to the server in the same place.

11. Re-upload the Files, Packages, themes folder you downloaded in step 3.

12. Go to your domain and see if it is all there and that it works. To log in, you may need the password generated by Simple Scripts or Concrete5. When in, go to control panel and change the password for the admin to something you’ll remember.

13. Install or activate your theme. Test it, look for missing images, etc.

14. Don’t forget to re-create any email addresses or similar items from the previous web sites



Alternate Installation

In step 7 I mention installing Concrete5 , without the help of Simple Scripts. It can be done, but is a bit trickier.

The advantage of this method is you do not need to modify/alter the site.php file in step 10 above.

1a. Clear and turn off the Concrete5 Cache.

Login as admin>>Dashboard>>Sitewide Settings>>Debug Tab>>Clear Cache>>Select Disable Cache>> Update Cache

2a. Skip the exporting of the database for now.

3a. Download your current Files and packages directory into your local computer. Themes also if you put any there.

4a. Transfer/Change Domain Name DNS to new host servers in your domain name control panel on the registrars web site.

Transfer Concrete5 Web Site

Your domain name may need to resolve before continuing to step 5. Continuing will depend on if you have FTP access before the domain name resolves.

5a. Create a hosting account or log into the destination/target hosting account

6a. ADD your domain to your account. I add it without the WWW’s.

7a. Install Concrete5 with your favorite FTP client to the new host server.

8a. Create a new database for the new Concrete5 installation on the target computer.

9a. Once the domain name has resolved, go to your domain and run the installation wizard. (MAKE SURE YOU USE AN ACTIVE AND VALID EMAIL ADDRESS. SEE 13a.) Run the installation wizard like you normally would.

10a. Once the install is complete, upload your FILES, PACKAGES, and THEMES folders to the original locations.

11a. Go to your original phpMyAdmin in the control panel of the previous host.

Export database using the SAME naming convention of the NEW database you made on Target Host you made in step 8a.

Log into your web site control panel. I have cPanel for the current and target hosting companies.

Go to phpMyAdmin (at least this is in my control panel) >>Select the current database

Click Export tab along the top>>Select all tables>>Select SQL>>CHECK Structure plus check the boxes below:

Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT
Add IF NOT EXISTS
Add AUTO_INCREMENT value
Enclose table and field names with backquotes
Add CREATE PROCEDURE / FUNCTION / EVENT


Check the SAVE AS box at bottom and add the database name YOU CREATED ON THE NEW HOST FOR THE NEW DATABASE on the destination / target host >> compression - none.>>GO

Save the newhostdbschema_dbname.sql file to your local computer.

IMPORTANT THE EXPORTED FILE NAME MATCHES THE NEW DATABASE NAME ON THE TARGET HOST.

Close phpMyAdmin.


12a. Go to the Destination/Target host >> Open Control Panel>>Open phpMyAdmin >> Highlight the NEW database you just made and click import tab along the top. Browse for the export file from 11a.

Click GO.

13a. Go to your domain and try to log in. At this point I had couple of different issues.

1. When I logged in, none of the possible passwords for the admin would work. I had to use the reset password procedure to reset the password to log in.

2. My theme did not appear correctly at first. I had to make sure that the theme was installed, then I activated the plain yogurt theme and then re-activate the desired theme.


14a. Recreate any email addresses,etc used on your site.

After that, in my case all was well. I hope you have as much success.

I am sure there are other ways to do it. I am only showing what worked for me.

This tutorial applies ONLY to moving from one web host server to a new web host server.

jerlo727
 
Mnkras replied on at Permalink Best Answer Reply
Mnkras
http://www.concrete5.org/documentation/installation/moving_a_site

already made a step by step tutorial ;)
jerlo727 replied on at Permalink Reply
jerlo727
I saw that post.

My post is specific for moving to another web host. Not from a sandbox or test scenario on the same server.

I did get some good hints from the original moving a site documentation.

I see you are the author of the original tutorial, and it was helpful. Please, no offense, but I found that documentation confusing in some areas. It assumes you are proficient in all aspects for Concrete5. I am still learning Concrete5. I wrote these instructions for myself and thought to share them.

An example of 1 confusing area for me. The original tutorial says to back up the database in step 1, but you neglect to say that you need it in step 10.

I had never done that before. The original tutorial neglects to say how to export or how to import the database.

After re-reading your tutorial, I see I neglected to mention disabling the pretty URL's and to run the jobs in system & maintenance.

I'm not using pretty URL's so that wasn't a consideration. And after re-reading the post, I ran the jobs.

Thank you for response. Thank you for not slamming me for posting something redundant.

Like I said at the beginning. This post is specific for moving to another web hosting company and I tried to go into more detail for novices like myself.

Regards,

Jerlo
Mnkras replied on at Permalink Reply
Mnkras
The tutorial i wrote includes moving webhosts, there is almost no difference, if you are moving hosts, then you should know how to backup and restore a db, and if you don't there are 100's of tutorials all over the web

in order to not have to reset all the passwords, open up the config/site.php

and copy the PASSWORD_SALT
jerlo727 replied on at Permalink Reply
jerlo727
Thanks for the info on the password salt.

If you think this is too redundant, then delete it.

I was just trying to help.
Mnkras replied on at Permalink Reply
Mnkras
nah its fine,
AndYMacKay replied on at Permalink Reply
jerlo,

just wanted to say thanks for this and that it is definitely not redundant!

Mnkras tutorial is great as far as it goes, and normally I'm a huge fan of stripped down "here are the essential steps, fill in the gaps yourself" tutorials. They aid learning by making you think for yourself and avoid you having to read through lots of redundant information.

However in this case I was working to a tight deadline and needed to get it moved asap to get on with the front-end work I know and love.

Your steps are very clear and I by referring to them alongside the documentation was able to get my site moved without a hitch whilst also developing some further understanding of phpmyadmin.

Great job! :D
ericob replied on at Permalink Reply
Question about that tutorial. In it you write "make sure there are NO slashes in it!" in reference to a URL. What do you mean?? ALL URLs have slashes in them, including the one in your example.

Next, a suggestion. When writing step-by-step instructions, where the ORDER of things matters, please DO NO write the instructions in reverse order.

"Do this, do this do this... BUT FIRST..." Please, put the first thing first. None of this "then pour 5 quarts of oil into the engine. But first make sure that you have reinstalled the oil drain plug."

See?

Thanks.
jbx replied on at Permalink Reply
jbx
Alternatively ericob, you could say "Thanks Mike for the great tutorial, but I have a couple of suggestions that could improve it...".

Also please do not cross post your complaints about there being no documentation on how to move a site when you haven't looked under "Documentation - Installation - Moving a site". Seems like the right place to me...

Sorry if that post sounds grumpy, but hey, so does yours ;)

Have you managed to solve the problem and successfully move your site? If not, post back back here and I'll help you out...

Jon
jerlo727 replied on at Permalink Reply
jerlo727
I was again moving a concrete5 site a few days aga, but it was from an older installation/version to a newer.

That did not work. I suspect because a slight mismatch between the set of tables from the original version to the latest version.

Conclusion, the versions need to be the same.

ericob - I state above that I am new to concrete 5 and this process worked for me and it was intended to be a list of things to consider in moving the site, not official documentation.

Also, a search of the page finds "slash" referenced only in your post and I reread the original post. I am not sure what your talking about.

I may have been referring to a trailing slash. Sometimes trailing slashes are not needed in some situations.

Thank you for your inputs.

Jerlo
jbx replied on at Permalink Reply
jbx
He was referring to Mnkras's link.

When Mnkras said NO slashes, he meant no trailing slashes :)

Jon