Hello. I apologize if someone already answered this but i can't seem to find it. Is there an easy way to push my site from my dev server (local windows xp machine running apache) to my live server (linux machine)? I am uploading the entire directory and backup/restore the database but I suspect there are settings that need to be changed. Anyone have a one, two, three approach to moving a site to another server?
Thanks!
Oopsie...
Mar 02, 2009 at 12:32 AM
in the previous post's code the base url should just be http://changeme.com (without all <a href> stuff, it got bejangled somehow. :)
Maybe this is right...
Mar 02, 2009 at 12:39 AM
--- see the settings in config/site.php ---
1-Import your database to your new server.
2-Upload your public_html (htdocs) files to your new server. (if you want to: compress local then uncompress on server side using ssh or cPanel or similar)
3-Change the following code located in config/site.php to match your needs.
(usually 'localhost' doesn't need changing.)
If you are installing concrete5 in to your root (public_html) directory, then use / as the DIR_REL
Hopefully that helps :)
It's really late so if this is neither correct or complete, please excuse. :) Someone can chime in to confirm though.
1-Import your database to your new server.
2-Upload your public_html (htdocs) files to your new server. (if you want to: compress local then uncompress on server side using ssh or cPanel or similar)
3-Change the following code located in config/site.php to match your needs.
(usually 'localhost' doesn't need changing.)
<?php
define('DB_SERVER','localhost');
define('DB_USERNAME', 'changeme');
define('DB_PASSWORD', 'changeme');
define('DB_DATABASE', 'changeme');
define('BASE_URL', '<a href="http://changeme.com');" title="http://changeme.com');" rel="nofollow">http://changeme.com');</a>
define('DIR_REL','/concreteinstallfolderIfExsists');
define('PASSWORD_SALT','somecrazyalphanumericstringLeaveAlone');
?>
define('DB_SERVER','localhost');
define('DB_USERNAME', 'changeme');
define('DB_PASSWORD', 'changeme');
define('DB_DATABASE', 'changeme');
define('BASE_URL', '<a href="http://changeme.com');" title="http://changeme.com');" rel="nofollow">http://changeme.com');</a>
define('DIR_REL','/concreteinstallfolderIfExsists');
define('PASSWORD_SALT','somecrazyalphanumericstringLeaveAlone');
?>
If you are installing concrete5 in to your root (public_html) directory, then use / as the DIR_REL
Hopefully that helps :)
It's really late so if this is neither correct or complete, please excuse. :) Someone can chime in to confirm though.
well sorry...
Mar 02, 2009 at 12:41 AM
...it keeps throwing in that extra stuff. hopefully you get the idea :)
almost there...
Mar 04, 2009 at 9:28 AM
Thanks for your help with this - i'm getting the following error when i try to access the site. any ideas?
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1146: Table 'fcaangel_concrete5.Packages' doesn't exist] in EXECUTE("select pkgID, pkgName, pkgIsInstalled, pkgDescription, pkgHandle, pkgDateInstalled from Packages order by pkgID asc") ' in /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(918): adodb_throw('mysql', 'EXECUTE', 1146, 'Table 'fcaangel...', 'select pkgID, p...', false, Object(ADODB_mysql)) #1 /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(893): ADOConnection->_Execute('select pkgID, p...', false) #2 /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(645): ADOConnection->Execute('select pkgID, p...', false) #3 /home5/fcaangel/public_html/concrete/libraries/database.php(62): ADOConnection->Query('select pkgID, p...') #4 [internal function]: Database->__call(Array, Array) #5 /home5/fcaangel/public_ht in /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78
My site.php looks like this:
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'fcaangel_fca');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'fcaangel_concrete5');
define('BASE_URL', 'http://66.147.240.162');
define('DIR_REL', '/');
define('PASSWORD_SALT', 'blahblahetc');
The domain isnt transfered yet, hence the IP. could that be my problem?
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1146: Table 'fcaangel_concrete5.Packages' doesn't exist] in EXECUTE("select pkgID, pkgName, pkgIsInstalled, pkgDescription, pkgHandle, pkgDateInstalled from Packages order by pkgID asc") ' in /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(918): adodb_throw('mysql', 'EXECUTE', 1146, 'Table 'fcaangel...', 'select pkgID, p...', false, Object(ADODB_mysql)) #1 /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(893): ADOConnection->_Execute('select pkgID, p...', false) #2 /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(645): ADOConnection->Execute('select pkgID, p...', false) #3 /home5/fcaangel/public_html/concrete/libraries/database.php(62): ADOConnection->Query('select pkgID, p...') #4 [internal function]: Database->__call(Array, Array) #5 /home5/fcaangel/public_ht in /home5/fcaangel/public_html/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78
My site.php looks like this:
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'fcaangel_fca');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'fcaangel_concrete5');
define('BASE_URL', 'http://66.147.240.162');
define('DIR_REL', '/');
define('PASSWORD_SALT', 'blahblahetc');
The domain isnt transfered yet, hence the IP. could that be my problem?
Cache?
Mar 09, 2009 at 7:49 AM
I had to delete the Cache folders in Files to get it to work when I moved my site
Database
Mar 10, 2009 at 5:11 PM
I had the EXCACT same error when I moved a clients site from my localhost to the actual server. Look in PHPmyadmin on your localhost and then again on your live server. You will notice one big really annoying difference. On your localhost (if your setup is the same as mine, wamp) all the table names are in lowercase. On the live server they have to be upper and lower (example: Packages instead of packages). I do not know the cause of the problem, but how I solved it for my client was to rename all the tables to upper and lower. The site is now functioning flawlessly.
If anyone else knows a quicker way to solve this problem please let me know but that is the surefire way that I found.
If anyone else knows a quicker way to solve this problem please let me know but that is the surefire way that I found.
MySql
Mar 24, 2009 at 4:01 AM
Hi There!
Just wanted to know what sql statement you executed to get this done. Or did you actually change the names on all the tables manually. I have the exact same problem .
Just wanted to know what sql statement you executed to get this done. Or did you actually change the names on all the tables manually. I have the exact same problem .
a few stmt
Mar 24, 2009 at 4:10 AM
<?php
RENAME TABLE areagroupblocktypes TO AreaGroupBlockTypes;
RENAME TABLE areagroups TO AreaGroups;
RENAME TABLE areas TO Areas;
RENAME TABLE blockrelations TO BlockRelations;
RENAME TABLE blocks TO Blocks;
RENAME TABLE blocktypes TO BlockTypes;
RENAME TABLE btcontentfile TO btContentFile;
RENAME TABLE btcontentimage TO btContentImage;
RENAME TABLE btcontentlocal TO btContentLocal;
RENAME TABLE btexternalform TO btExternalForm;
RENAME TABLE btfile TO btFile;
RENAME TABLE btflashcontent TO btFlashContent;
RENAME TABLE btform TO btForm;
RENAME TABLE btformanswers TO btFormAnswers;
RENAME TABLE areagroupblocktypes TO AreaGroupBlockTypes;
RENAME TABLE areagroups TO AreaGroups;
RENAME TABLE areas TO Areas;
RENAME TABLE blockrelations TO BlockRelations;
RENAME TABLE blocks TO Blocks;
RENAME TABLE blocktypes TO BlockTypes;
RENAME TABLE btcontentfile TO btContentFile;
RENAME TABLE btcontentimage TO btContentImage;
RENAME TABLE btcontentlocal TO btContentLocal;
RENAME TABLE btexternalform TO btExternalForm;
RENAME TABLE btfile TO btFile;
RENAME TABLE btflashcontent TO btFlashContent;
RENAME TABLE btform TO btForm;
RENAME TABLE btformanswers TO btFormAnswers;
Viewing 15 lines of 60 lines. View entire code block.
not sure if it's complete..
Can't move to different directory
Mar 24, 2009 at 3:26 PM
I have the same problem. I installed Concrete 5 in a subdirectory to test it out and decided to use it. I moved the file structure into the document root directory and changed the value for DIR_REL in config/site.php to '/'. This should have been easy, but I continue to get errors about files not being found and references to the OLD file paths. I assume it's was due to cache, but even when I renamed the cache folder and created new one I still get the errors. Maybe there's a cache for previous database query results? I've searched the database and text files for the name of the old directory but no occurences. I'm stumped, any ideas? Thanks!
Moving directories
Apr 08, 2009 at 6:25 PM
I'm having the same issue... What is needed to move from a \test dir to a \ dir?
not working for me
Apr 20, 2009 at 3:27 PM
I tried what you suggested and my site comes up but the links all point to the old site, I can't sign in, the link says http://index.php/login. Anything else I need to change?
Moving directory
Apr 11, 2009 at 3:26 AM
To move concrete5 from a test directory to root, or vice versa, you must first move ALL concrete5 files that you are working on in the folder that you want, then, to check that it worked, go to your website where you put it. It should display a 404 error message. Don't worry, it's normal. Then, open config/site.php in notepad, or some text editor you like, or even in your administration panel for your website and remove the code:
(This code will ONLY work if you are moving it to the root:
... and replace it with:
And, if you are moving it to another directory, replace the forward slash after: define('DIR_REL' :with your sub directory, excluding http://www.yourdomain.com. eg. If you were putting it in http://www.yourdomain.com/test/concrete5... then you would replace the forward slash with /test/concrete5 .
Hope it helps,
fikelfikel
(This code will ONLY work if you are moving it to the root:
<?php define('DIR_REL'yourdirectory ''); ?>
... and replace it with:
<?php define('DIR_REL'/ ''); ?>
And, if you are moving it to another directory, replace the forward slash after: define('DIR_REL' :with your sub directory, excluding http://www.yourdomain.com. eg. If you were putting it in http://www.yourdomain.com/test/concrete5... then you would replace the forward slash with /test/concrete5 .
Hope it helps,
fikelfikel
Try it a different way
Apr 16, 2009 at 9:13 PM
I beat my brain over this one for far too long today... moving my dev site to a live site from primary.com/addon/ to addon.com
The configuration that finally worked (flawlessly) for me was:
define('BASE_URL', 'http://www.addon.com');
define('DIR_REL', '');
as in no / is the DIR_REL line.
Anyone visiting the naked domain (addon.com) will automatically redirect to http://www.addon.com
The configuration that finally worked (flawlessly) for me was:
define('BASE_URL', 'http://www.addon.com');
define('DIR_REL', '');
as in no / is the DIR_REL line.
Anyone visiting the naked domain (addon.com) will automatically redirect to http://www.addon.com
re: Moving directory
Nov 10, 2009 at 9:36 PM
This one (getting rid of the "/") worked for me. Does that mean something else is configured wrong?
Clear your cache
Jul 07, 2009 at 3:44 PM
You need to clear your cache in the Debug tab of Sitewide Settings in your Dashboard.
re: a few stmt
Feb 08, 2010 at 7:49 AM
Remo, thanks! I've adjusted your SQL to include all the tables in my (5.3.3.1) installation.
This SQL code works for me on my Windows box; without the additional rename to "_{$table}" MySQL wouldn't do a rename at all.
You probably have to add "lower_case_table_names=2" to the [mysqld] section of your my.ini first, though - as suggested below. And don't forget to restart your MySQL-server :)
<?php
ALTER TABLE areagroupblocktypes RENAME _areagroupblocktypes;
ALTER TABLE areagroups RENAME _AreaGroups;
ALTER TABLE areas RENAME _Areas;
ALTER TABLE ataddress RENAME _ataddress;
ALTER TABLE atboolean RENAME _atboolean;
ALTER TABLE atbooleansettings RENAME _atbooleansettings;
ALTER TABLE atdatetime RENAME _atdatetime;
ALTER TABLE atdatetimesettings RENAME _atdatetimesettings;
ALTER TABLE atdefault RENAME _atdefault;
ALTER TABLE atfile RENAME _atfile;
ALTER TABLE atnumber RENAME _atnumber;
ALTER TABLE atselectoptions RENAME _atselectoptions;
ALTER TABLE atselectoptionsselected RENAME _atselectoptionsselected;
ALTER TABLE atselectsettings RENAME _atselectsettings;
ALTER TABLE areagroupblocktypes RENAME _areagroupblocktypes;
ALTER TABLE areagroups RENAME _AreaGroups;
ALTER TABLE areas RENAME _Areas;
ALTER TABLE ataddress RENAME _ataddress;
ALTER TABLE atboolean RENAME _atboolean;
ALTER TABLE atbooleansettings RENAME _atbooleansettings;
ALTER TABLE atdatetime RENAME _atdatetime;
ALTER TABLE atdatetimesettings RENAME _atdatetimesettings;
ALTER TABLE atdefault RENAME _atdefault;
ALTER TABLE atfile RENAME _atfile;
ALTER TABLE atnumber RENAME _atnumber;
ALTER TABLE atselectoptions RENAME _atselectoptions;
ALTER TABLE atselectoptionsselected RENAME _atselectoptionsselected;
ALTER TABLE atselectsettings RENAME _atselectsettings;
Viewing 15 lines of 200 lines. View entire code block.
This SQL code works for me on my Windows box; without the additional rename to "_{$table}" MySQL wouldn't do a rename at all.
You probably have to add "lower_case_table_names=2" to the [mysqld] section of your my.ini first, though - as suggested below. And don't forget to restart your MySQL-server :)
re: Database
Nov 08, 2009 at 10:03 AM
If you have installed onto your local dev sever using Wamp, then try the following. It corrects the naming of the tables in the database.
Left-click the wamp gauge, then select Apache → Apache Modules → Rewrite Module. The gauge will flick to yellow, and then return to white.
Left-click the gauge, then select MySQL → my.ini. At the very bottom of the file, and add the following to a new line (without the quotes): “lower_case_table_names = 2”. Save the file, close Notepad and left-click the gauge, and selected ‘Restart all services’
Left-click the wamp gauge, then select Apache → Apache Modules → Rewrite Module. The gauge will flick to yellow, and then return to white.
Left-click the gauge, then select MySQL → my.ini. At the very bottom of the file, and add the following to a new line (without the quotes): “lower_case_table_names = 2”. Save the file, close Notepad and left-click the gauge, and selected ‘Restart all services’
Still not working - white/blank page showing
May 28, 2009 at 10:17 AM
hi!
I've already entered the right configuration but when I view the site, it shows only white page or blank.
Why is that happening? what is the solution?
Thanks
-vin
I've already entered the right configuration but when I view the site, it shows only white page or blank.
Why is that happening? what is the solution?
Thanks
-vin
Oh and one more little thing...
Jul 20, 2009 at 1:45 AM
If you have pretty urls turned on, you gotta edit the .htaccess file to change the rewrite rule base. So in this example, if the site was originally set up in the /c5 off the site root, .htaccess would have this:
RewriteBase /c5/
which would need to change to:
RewriteBase /
or, of course, vice versa if you're moving from the site root to a subdirectory. Or you could just turn off pretty urls then turn them on again & cut and paste the revised text for your .htaccess file.
RewriteBase /c5/
which would need to change to:
RewriteBase /
or, of course, vice versa if you're moving from the site root to a subdirectory. Or you could just turn off pretty urls then turn them on again & cut and paste the revised text for your .htaccess file.
... and I could move the installation
Aug 11, 2009 at 3:21 AM
After serveral problems trying to move from one server to another (from one Linux to another), I got it work!
Just in case it helps, I'll explain briefly the steps I followed:
1.- Concrete full DB Backup (I did it from phpMyAdmin)
2.- Copy all concrete dir structure with all files
3.- Restore DB in the new server (creating a new schema if necessary)
4.- Restore all files and directories of Concrete in the new File System.
5.- Change owner of concrete file structure. Owner should be the same that runs Apache(ie. www, www-data, etc.)
6.- Change group accordingly to step 5.
7.- Finally modify config/site.php in order to specify all new parameters. (In my case I changed all of them, except for DB_DATABASE as I restored the DB creating the same schema as the original).
An with this, it worked. I hope for you too!
Just in case it helps, I'll explain briefly the steps I followed:
1.- Concrete full DB Backup (I did it from phpMyAdmin)
2.- Copy all concrete dir structure with all files
3.- Restore DB in the new server (creating a new schema if necessary)
4.- Restore all files and directories of Concrete in the new File System.
5.- Change owner of concrete file structure. Owner should be the same that runs Apache(ie. www, www-data, etc.)
6.- Change group accordingly to step 5.
7.- Finally modify config/site.php in order to specify all new parameters. (In my case I changed all of them, except for DB_DATABASE as I restored the DB creating the same schema as the original).
An with this, it worked. I hope for you too!
move test dir to root dir
Sep 29, 2009 at 8:53 PM
I'm new to Concrete. I tried moving from test to root dir and changed the site.php. Initially the home page worked when I tried the other pages, it gave me this error:
mysql error: [-32000: Cache write error]. I went back to the test dir and clear the cache and now I get this error from root home page:
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [-32000: Cache write error] in CacheExecute(/var/www/html/docs/server.com/files/cache/05/adodb_055c9a641e111c50d1caaf6b29c64685.cache, select ctID from PageTypes) ' in /var/www/html/docs/server.com/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /var/www/html/docs/server.com/concrete/libraries/3rdparty/adodb/adodb.inc.php(1819): adodb_throw('mysql', 'CacheExecute', -32000, 'Cache write err...', '/var/www/html/d...', 'select ctID fro...', Object(ADODB_mysql)) #1 /var/www/html/docs/server.com/concrete/libraries/database.php(34): ADOConnection->CacheExecute(10, 'select ctID fro...') #2 /var/www/html/docs/server.com/concrete/models/permissions.php(461): Database->querycache(10, 'select ctID fro...') #3 /var/www/html/docs/server.com/concrete/models/permissions.php(72): CollectionPermissions->CollectionPermissions(Object(Page)) #4 /var/www/html/docs/server.com/concrete/models/permissions.php(116): PermissionsProxy:: in /var/www/html/docs/server.com/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78
Appreciate some help. Thanks.
mysql error: [-32000: Cache write error]. I went back to the test dir and clear the cache and now I get this error from root home page:
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [-32000: Cache write error] in CacheExecute(/var/www/html/docs/server.com/files/cache/05/adodb_055c9a641e111c50d1caaf6b29c64685.cache, select ctID from PageTypes) ' in /var/www/html/docs/server.com/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /var/www/html/docs/server.com/concrete/libraries/3rdparty/adodb/adodb.inc.php(1819): adodb_throw('mysql', 'CacheExecute', -32000, 'Cache write err...', '/var/www/html/d...', 'select ctID fro...', Object(ADODB_mysql)) #1 /var/www/html/docs/server.com/concrete/libraries/database.php(34): ADOConnection->CacheExecute(10, 'select ctID fro...') #2 /var/www/html/docs/server.com/concrete/models/permissions.php(461): Database->querycache(10, 'select ctID fro...') #3 /var/www/html/docs/server.com/concrete/models/permissions.php(72): CollectionPermissions->CollectionPermissions(Object(Page)) #4 /var/www/html/docs/server.com/concrete/models/permissions.php(116): PermissionsProxy:: in /var/www/html/docs/server.com/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78
Appreciate some help. Thanks.
re: move test dir to root dir
Nov 03, 2009 at 6:01 PM
Did you solve this? normally I have no problems with my own server as I'm working on another providers server I now have this issue. If you solved it could you post to how you did
Thankyou
Thankyou
re: move test dir to root dir
Nov 03, 2009 at 7:18 PM
I didn't get it to work by moving the test to root directory. I changed the virtual domain root (httpd) path to the test dir.
No answer to date from the forum or anyone. Good luck!
No answer to date from the forum or anyone. Good luck!
re: Move from dev to live server
Feb 18, 2010 at 2:39 PM
I am having the same issue when trying to copy from 1 directory to another. I have tried all the above procedures, but I still get in my browser "Internet Explorer cannot display the webpage" and an "[apc-error] Cannot redeclare class object" entry in my log/httpd/error_log. Thanks in advance!
re: Move from dev to live server
Feb 18, 2010 at 3:52 PM
I got it to work finally. I cleared the cache using the concrete debug tool. Copyied my database to a new one using phpMyAdmin. Copied all my files to a new directory using "cp -rp c5 c5new". Edited my config/site.php. Here is the kicker, I then had to restart my apache server. That one mystifies me, but I guess php needed to be reset for some reason.





Matt
config/site.php
1-Import your database to your new server.
2-Upload your public_html (htdocs) files to your new server. (if you want to: compress local then uncompress on server side using ssh or cPanel or similar)
3-Change the following code located in config/site.php to match your needs.
(usually 'localhost' doesn't need changing.)
define('DB_SERVER','localhost');
define('DB_USERNAME', 'changeme');
define('DB_PASSWORD', 'changeme');
define('DB_DATABASE', 'changeme');
define('BASE_URL', '<a href="http://changeme.com');" title="http://changeme.com');" rel="nofollow">http://changeme.com');</a>
define('DIR_REL', '/concreteinstallfolderIfExsists');
define('PASSWORD_SALT', 'somecrazyalphanumericstringLeaveAlone');
?>
If you are installing concrete5 in to your root (public_html) directory, then use / as the DIR_REL
Hopefully that helps :)
It's really late so if this is neither correct or complete, please excuse. :) Someone can chime in to confirm though.