Cloning and working on a copy of an existing Concrete website
I've been asked to look at making a copy of an existing Concrete website that i look after and to see if it's easy enough to rebrand for a different use / products.
I've copied the database and all the files and i have them setup in a domain i use for testing. I've changed the database config and all the other bits needed as perhttps://documentation.concrete5.org/developers/introduction/installa...
The problem i'm finding is the path's are messed up. So i've had to set a php variable at the top of the header.php to set a url for the test or live enviroment, i can live with that as i can just change the variable as and when needed if its test or live.
However, accessing the Concrete dashboard isn't working as expected as in, usually i'd expect to go to :
but this just takes me to the root of my test site. If i insert index.php into the url thedashboard appears and i can login, as below :
but why is it doing this?
If i try and upload an item via a page that's setup in the dashboard it fails and again it looks to be path related as in it's looking for the upload folder using $target = $_SERVER['DOCUMENT_ROOT']. which is resolving the root of my test site and not the subfolder that i set the clone up in...
as inhttp://www.mywebsite.com/cloned_site/... it's looking to upload tohttp://www.mywebsite.com/
Life would be a lot easier if there was a simple config line that you could setup in concrete to tell it where the actual site resides. I'm finding i'm having to hack away at bits of code just to get the basics working which is pretty frustrating, am i doing something wrong or does cloning a concrete website really take a lot of work?
Do i have to go and manually change any reference to $target = $_SERVER['DOCUMENT_ROOT']. or can i make a single change to a config somewhere just so that i can get a fully working clone of the site to function properly?
Turn that off before making your copy. Also turn off "remove index.php".
Also turn off all caching and clear the cache before making the backup.
These three things ought too stop any lingering redirections from happening. If you have other addons installed they might also need disabling.