Moving install - not making sense

15 posts by 6 authors in: Forums > CMS Builder
Last Post: May 23, 2012   (RSS)

By HDLLC - October 21, 2009

Hi there-

I found several threads on moving an install that involved upgrading, losing sections/recreating, etc...

I just need to move my site from one place to another (different host).
Will try upgrading later.

Where, exactly do I tell the software (cmsb) to look for the new server (adjust config settings)? Is that stuffed into the db? If so, can I just manually edit the old server settings, put in new, replace files and go?

Just want to move same install to new server - done.

Thanks!

--Jeff

Re: [HDLLC] Moving install - not making sense

By Chris - October 21, 2009

Hi Jeff,

Here's a step-by-step guide to moving your CMS Builder install from one server to another. I hope it helps!


1. Copy all your files to your new server. Make sure your cmsAdmin/data and cmsAdmin/uploads

2. Edit the cmsAdmin/data/settings.dat.php and change this line:

isInstalled = 1

to this:

isInstalled = 0

2. Run the software by pointing your web browser at cmsAdmin/ and "reinstall" it. If you forget your Product Id, you can find it in settings.dat.php. This process will fix some directory settings and allow you to create an admin account you can use temporarily until you've moved your database accross.

3. Login to CMSB and go to Admin > General Settings. If necessary, update the "Upload Directory" and "Upload Folder URL" entries. Upload Directory should probably be Program Directory plus "/uploads". Upload Folder URL probably won't need to change if your new site has the same URL structure as your old site.

4. Move your database. If you're using CMSB version 1.34 or later, see step 4a; if you're using an older version, see step 4b.

4a. Instructions for CMSB v1.34+: Login to your old site and go to Admin > General Settings. Under Database Settings, click the "Backup" button. Move the file you just created to your new server. Login to your new site and go to Admin > General Settings (or refresh the page if you already have it open.) Under Database Settings, select the exact file you moved and click "Restore". Done.

OR

4b. Instructions for CMSB v1.33-:


1. Open the old CMS database in PHPMyAdmin
2. Click on the export tab
3. On the left side make sure all tables are selected and SQL is selected
4. Under "Structure" make sure the following is checked:

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

5. Check "Save as file" and click go
6. It should ask you to save an sql file - click save
7. Open the new CMS database in PHPMyAdmin
8. Click "Import" and then select the sql file you saved earlier - then click go.


5. Update the "require_once" lines in (all) your viewer pages to reflect the new path to viewer_functions.php. You can get the new path by using CMSB's Code Generator to generate some code (anything will do) and looking for the require_once line.

6. If you had to change "Upload Folder URL" earlier, you'll need to fix your upload records. Uploaded files are stored in a table called 'uploads' (possibly with a Table Name Prefix, depending on your configuration.) There are two ways to do this:

6a. Remove all your uploads and re-upload them.

OR

6b. Fix the rows in the database table. The fields which need updating are "filePath", "urlPath", "thumbFilePath", "thumbUrlPath". If you've used extra thumbnails, you may also need to update "thumbFilePath2", "thumbUrlPath2", "thumbFilePath3", "thumbUrlPath3", "thumbFilePath3", and "thumbUrlPath4".

7. Test, test, test your website. You may have other absolute paths or URLs in your site which need to be fixed.


Please let me know if you have any questions or run into any problems.
All the best,
Chris

Re: [chris] Moving install - not making sense

By HDLLC - October 22, 2009

Thanks Chris! Great info - just what I was looking for!

Worked like a champ.

One thing - I needed this to restore some web sites from a server crash at the ISP (both primary and backup went dead).

So... One site is missing the admin so I combed through and found another. Bad idea. It picked up their admin options (site sections, etc).

Where do I edit that out and get the right options back?

Thanks!

--Jeff

Re: [chris] Moving install - not making sense

By HDLLC - October 23, 2009

Okay - bad news... I have the database, and everything is there, even images. Missing this schema folder.

Guess it was the only thing I cannot find from my data recovery...

Any way to rebuild that or...?

Thanks!

--Jeff

Re: [HDLLC] Moving install - not making sense

By Dave - October 26, 2009

Jeff,

Are you able to copy the /data/schema/ folder from your old install (or your backup) to your new install?

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Moving install - not making sense

By HDLLC - October 26, 2009

Hi Dave-

I talked with Ross a bit this morning - and no...
I am working from a crashed drive, so no backup of schema...
Manual rebuild of that file?

I think he's taking a look to see what it will take.

Will let ya know! Thanks!

--Jeff

Re: [HDLLC] Moving install - not making sense

By Dave - October 26, 2009

Ok, I'll leave that with you and Ross, then.

My quick advice on re-creating the schema's is:
- Make sure you have a backup of whatever you have now so you can always go back to that
- See what tables and fields are in the database
- Create sections and fields in the field editor that match what's in the database.

Once you've done that your data should appear again. The field editor just ignores fields it doesn't know about.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Moving install - not making sense

By HDLLC - October 26, 2009

Hi Dave-

Yeah, I usually do have a backup, but the unbelievable happened.
Server died, and so did the ISPs backup.

As i was restore the sites, I suffered a similar fate and had to have my drive recovered in a "clean room" and have a few files that didn't make the recovery.

These few files are the culprits at the moment.

Thanks!

--Jeff

Re: [HDLLC] Moving install - not making sense

By sublmnl - March 4, 2012 - edited: March 4, 2012

I don't see this in Chris' instructions in the file:

2. Edit the cmsAdmin/data/settings.dat.php and change this line:


isInstalled = 1


we are running version 2.14