A MODx site I have has had the URL changed, the server engineer tells me that when he removes the DNS entry or the ServerAlias from the server settings for the old domain the site falls over... Where would there be any hard coded urls in MODx to use the old URL path? He also mentions that the site is running with a symlink from the old url to the new one - without the symlink the site also falls over...
Any ideas?
Thanks chaps.
-
☆ A M B ☆
- 24,524 Posts
The only things that are hard-coded are the full paths and absolute URLs in the three config.core.php files - one in the site root, one in /connectors/ and one in /manager/, and the core/config/config.inc.php file.
These values are calculated during setup. Running Setup again in upgrade mode should correct any necessary changes. Or, you can edit these by hand. If you do edit the config.inc.php file by hand, be very careful to examine each line. It's easy to miss one. The sections look something like this:
if (!defined('MODX_ASSETS_PATH')) {
$modx_assets_path= '/Applications/MAMP/htdocs/assets/';
$modx_assets_url= '/assets/';
define('MODX_ASSETS_PATH', $modx_assets_path);
define('MODX_ASSETS_URL', $modx_assets_url);
}
OK - all paths are fine - connecting to the correct URL path... am stumped as to what the issue here is then!
Server engineer informs me the references to the old URL are in the "core/cache/mgr/smarty" folder - I can just go in and physically delete those files can't I? No need for them anymore? I cleared the site cache from within the manager but appears these files still remain. Can I manually delete all files / folders in the "core/cache" folder to sort this with no ill effects on the site?
-
☆ A M B ☆
- 24,524 Posts
Yes, delete the whole /core/cache/ folder, MODX will regenerate it.
BobRay has provided the CacheClear extra that will clear the entire cache. The "refresh site" cach-clearing menu item only clears resource and element caches.