Moving site to subfolder

Permalink
Hi guys and gals,

I'm looking to move just the files from my testing server athttp://174.121.85.92/~execms/ to executive-lodging.com/cms/

but I want to keep the database on the originalhttp://174.121.85.92/~execms/

How do I do this?

I downloaded and uploaded the files to the subfolder /cms and edited my config/site.php file to

define('DB_SERVER', 'http://174.121.85.92/~execms/');

Is there anything else I need to do?

Thanks,
Chris

bernardmarketing
 
nteaviation replied on at Permalink Reply
nteaviation
I'm pretty sure that will not work unless your test MySQL server will allow external connections. Most don't (because of security risk). In addition, DB_SERVER is an IP address or a DNS resolvable address, in most cases localhost. You may want to take a look at:
http://www.concrete5.org/documentation/installation/moving_a_site...
bernardmarketing replied on at Permalink Reply
bernardmarketing
Good afternoon,

I setup my database so it will accept remote access. It's almost working. It just says 'Unable to connect to database. A database error occurred while processing this request.'
nteaviation replied on at Permalink Reply
nteaviation
Ok, cool. Then I would expect your config/site.php to have something like:
define('DB_SERVER', '174.121.85.92');
define('DB_USERNAME', 'xxxxxxx');
define('DB_PASSWORD', 'xxxxxxx');
define('DB_DATABASE', 'xxxxxxx');
define('BASE_URL', 'http://executive-lodging.com');
define('DIR_REL', '/cms');

If C5 is in a sub-directory off of your webroot, you will need to set "DIR_REL". Hope that helps!
bernardmarketing replied on at Permalink Reply
bernardmarketing
Thanks for the info!
joseajohnson replied on at Permalink Reply
joseajohnson
Change
define('DB_SERVER', 'http://174.121.85.92/~execms/');

to
define('DB_SERVER', '174.121.85.92/~execms');


You may need the trailing slash.
nteaviation replied on at Permalink Reply
nteaviation
Not sure either of these will work. MySQL uses an IP address. Not one with a directory spec on the end. Be careful firewalls on both sides of the MySQL connection (port 3306 default) are playing nice :)
bernardmarketing replied on at Permalink Reply
bernardmarketing
I think you're right. I think it could be a firewall issue. I'll probably just have to move the database. Probably for the best anyway. Dang, that would have been cool.
nteaviation replied on at Permalink Reply
nteaviation
If this is a linux box, it would be pretty easy to punch a hole in the firewall on port 3306 that only accepted incoming connections from your new web server installation. On the other hand, having the MySQL server on localhost will be faster.