Moving to Production Server
10 posts by 5 authors in: Forums > CMS Builder
Last Post: December 11, 2008 (RSS)
By InHouse - April 22, 2008
The one thing I'm concerned about is that the development site was in a sub-directory under the public_html folder. The production server will have the site posted at the public level. This means that all the internal references to images, uploads, internal links, etc. need to be updated. Sounds like several hours of SQL scrubbing. Any suggestions about this process?
Jayme
Re: [InHouse] Moving to Production Server
By Dave - April 22, 2008
- MySQL data (use phpMyAdmin, etc)
- /data/ folder (with schema files and settings)
- /uploads/ folder
- viewer files
Then you'll need to update these settings:
- Admin > General > Upload Dir
- Admin > General > Upload Url
- Any custom upload dirs in the field editor (if you've used those)
- The require_once "" path in any viewers (you can get this from the code generator on the live server or use a relative path that will be the same on both servers).
Finally, all the image paths are relative from the root of the website, but if that path has changed you'll have to either put the new the uploads folder in the same place as the staging server and/or update the values in the section and upload tables.
I think we could do a few MySQL UPDATE statements with the MySQL replace function to replace all the old paths with new ones. Let me know if I can provide some help with that.
We hadn't anticipated staging and production servers having different web paths, but it's come up a couple times now, so perhaps there's some kind of automated solution we can add to make updating that easier...
Let's go through this process, figure out anything else that's missing and I can create a doc page for it for future.
Hope that helps.
interactivetools.com
Re: [Dave] Moving to Production Server
By InHouse - April 22, 2008
I'd be happy to have you keeping an eye on me during this process. Will be in touch regarding this.
Cheers,
J.
Re: [Dave] Moving to Production Server
By blukabm - August 28, 2008
So what I understand, we do not have to run the installation again? By copying over ALL files of the cmsAdmin which includes:
- /data/ folder (with schema files and settings)
- /uploads/ folder
- viewer files
And updating the URLS:
- Admin > General > Upload Dir
- Admin > General > Upload Url
We should be in good shape?
We only have dummy content in the MySQL, so do we need to still copy over? OR is the CMSAdmin going to look for the tables and cells that have been set up already, and regardless we should copy it over too. If so, it sounds like we are going to run into path issues.
HELP!
-Troy
Re: [blukabm] Moving to Production Server
By Dave - August 28, 2008
I'd start with a clean install - this will create a user account for you to login with. Otherwise you'll need to move over your user accounts database.
Then upload your /data/schema/ folder which has all your section settings.
The click on Admin > Section Editors and CMS Builder will generate any database tables or fields that don't exist already.
Then upload your viewers. Note that the "require_once ..." line in the viewers might need to be changed. You can get the correct filepath for this from: Admin > Code Generator
And that should do it.
Hope that helps, let me know if you need anything else or if you run into any problems.
interactivetools.com
Re: [Dave] Moving to Production Server
By cmsweb - August 28, 2008
Re: [cmsweb] Moving to Production Server
By benedict - December 3, 2008
You mention above:
"Finally, all the image paths are relative from the root of the website, but if that path has changed you'll have to either put the new the uploads folder in the same place as the staging server and/or update the values in the section and upload tables. "
I have been working on the CMS in a subdirectory so all the links are showing companyname/cmsAdmin/uploads/headshot.jpg. In other words, all my images from the CMS are not appearing now.
I can't do the first option mentioned above, but the second option is possible, but to update the values in the section and upload tables - is this in the CMS or in PHPMyAdmin? Whereabouts do I find it?
Regards,
Benedict
Re: [benedict] Moving to Production Server
By Dave - December 5, 2008
Yes, you'd have to use phpMyAdmin and do a search and replace on the data. You could do that for the uploads table as follows:
First, figure out the old path you want replace, in my example its: 'C:/wamp/www/'
Then figure out the new path you want, in my example its: 'X:/www/'
Here's the SQL to make the replacement:
UPDATE cms_uploads SET
filepath = REPLACE(filepath, 'c:/wamp/www/', 'X:/www/'),
urlpath = REPLACE(urlpath, 'c:/wamp/www/', 'X:/www/'),
thumbFilePath = REPLACE(thumbFilePath, 'c:/wamp/www/', 'X:/www/'),
thumbUrlPath = REPLACE(thumbUrlPath, 'c:/wamp/www/', 'X:/www/'),
thumbFilePath2 = REPLACE(thumbFilePath2, 'c:/wamp/www/', 'X:/www/'),
thumbUrlPath2 = REPLACE(thumbUrlPath2, 'c:/wamp/www/', 'X:/www/'),
thumbFilePath3 = REPLACE(thumbFilePath3, 'c:/wamp/www/', 'X:/www/'),
thumbUrlPath3 = REPLACE(thumbUrlPath3, 'c:/wamp/www/', 'X:/www/')
Hope that helps, don't forget to make a backup of your database first before making any changes.
interactivetools.com
Re: [Dave] Moving to Production Server
By benedict - December 9, 2008
I got that to work for all my uploads - so that's all good. I have one remaining problem. The links in my Wysyiwg editors are all incorrect as well. Is it quicker to just go through and fix manually? I thought about this:
UPDATE cms_why_choose_ects SET
content = REPLACE(content, 'ects/', '')
But I'm pretty sure that is not right. Because my links are inside a WYSIWYG and not just a straight text field with a single result, can it not be done with PhpMYAdmin?
Re: [benedict] Moving to Production Server
By Dave - December 11, 2008
That looks right to me. The way to test it before you make any changes is with this query:
SELECT content, REPLACE(content, 'ects/', '') FROM cms_why_choose_ects
This will output two columns, the original on the left and the updated version on the right. You can then check it over to make sure it's what you want before you actually update the data with "UPDATE". Select only displays and won't make any changes.
Hope that helps!
interactivetools.com