Hi all,
I have never heard of ModX, a client of mine has it running and I need to setup something else for their site. They are on 1and1 for hosts so the format is a bit different to cPanel. I have checked documentation already here.
Can somebody please give me some assistance in moving files including database to another host (HostGator) I have transfered all the files already to the new server and the URL will be different (this is sandbox)
Whenever I access the URL however of the new server, it redirects to the the real website. So my questions are firstly how do I download the mySQL database and what settings do I need to change for it display in a different URL? Whenever I try to upload the mySQL to cPanel it comes up with an error relating to 1and1?
Any help would be much appreciated.
Thanks - Jack
-
☆ A M B ☆
- 24,524 Posts
What is the error?
You should begin by clearing the site cache (from the Manager interface, Site -> Clear Cache). You don’t want to carry over any of the old site’s cached pages, since they’ll have menu items linked to the old URLs.
Then backup the database (Tools -> Backup). The grid has links for cleaning up the database and clearing the log tables that aren’t necessary to copy and can get quite large (system_events and manager_actions).
Copy the files to the new site (you’ll need to edit the manager/includes/config.inc.php file to have your new database access information), and import the .sql file from the old site using the control panel’s MySQL client (usually phpMyAdmin). You’ll need to make sure when creating the new database that its character encoding and collations are compatible with the old one. Depending on the error you’re getting, you may need to do a search/replace on the backup .sql file if it contains directives that the new one doesn’t like. You also might do better exporting the database from the phpMyAdmin using one of its compatibility modes, depending on the differences between the two database servers.
In the new site’s Tools -> Configuration, correct the paths and URLs in the Interface and Features tab (for the rich text resource browser) and the File Manager tab (for the MODx file manager). As a side benefit, saving the Configuration will refresh the main site configuration cache file.
Check the .htaccess file to make sure it didn’t hard-code any references to the old site or its URLs.
Thanks for your reply.
I did exactly what you said and can now import the mySQL. I went to domain.com/manager and it still redirects to the original website though, despite changing database details in the config file?
-
☆ A M B ☆
- 3,141 Posts
Did you check the .htaccess file?
Try www.domain.com/manager (note the www). It’s possible your client set it up to rewrite anything without www to the old domain with www.
If you’re unfamiliar with the syntax of the .htaccess file, just run a search on the old domain and see if it finds anything. If it does, you could post it here or attempt to fix it to use the new domain instead yourself. Just be careful, as a simple missing slash or apostrophe could result in your site returning internal server errors (500).
-
☆ A M B ☆
- 24,524 Posts
Actually, the rewrite engine should be Off for the manager anyway. The last time I had something like this happen it turned out to be my own inattention in forgetting that the bookmark I had for the site was for the original URL. Another thing you might want to check is the DNS records for the new site; if there’s a CNAME record for it pointing to the original site that would do the same thing.
-
☆ A M B ☆
- 3,141 Posts
Quote from: sottwell at Jun 26, 2010, 08:16 AMActually, the rewrite engine should be Off for the manager anyway.
I think the non-www -> www (or backwards) rewrite is before the exclude clause actually, so that would still affect the manager.