Moving to a New Web Server or Domain
Suppose you have WSN installed at site1.com and want to move it to site2.com:
- If you have a cookie path or cookie domain set at Admin Panel -> Settings -> System Configuration, set to a value that won't include the path/domain you're moving to, you'll need to update these before moving the site. If you forget to do that and find you can't login, you can use tweaks.php to reset the cookie path and domain.
- Download a database backup from the old server (though your favorite mechanism, be WSN's Admin Panel -> Maintenance -> Backups or phpmyadmin or cpanel) and then upload it to the new server.
- Move all the files (download from the old site, then upload to the new site, then delete the old).
- If your database connection information is different on the new server, edit your config.php file to change your old database connection info to the new info that applies on your new host.
- WSN should automatically update its config.php to the new location when you visit the site at the new location. If the autodetection of the move fails somehow and you get errors after moving, modify your config.php to update the $dirurl and $uploadpath values, delete the .htaccess file (if present) and resubmit Admin -> Settings -> SEO to get a new one generated.
Moving Within the Server
Suppose you have WSN installed on the base directory of your site, yoursite.com, and you want to move it to yoursite.com/directory:
- If you have a cookie path or cookie domain set at Admin Panel -> Settings -> System Configuration, set to a value that won't include the path/domain you're moving to, you'll need to update these before moving the site. If you forget to do that,
- Simply move the files in the filesystem (change the directory name... or download from the old location, then upload to the new location, then delete the old).
- WSN should automatically update its config.php to the new location when you visit the site at the new location. If the autodetection of the move fails somehow and you get errors after moving, modify your config.php to update the $dirurl and $uploadpath values, delete the .htaccess file (if present) and resubmit Admin -> Settings -> SEO to get a new one generated.
Note that step 1 is important because if you don't change the url setting before moving you'll end up getting redirected to the old location when logging in to your admin panel. Also note that if your install is already in a subdirectory, you can skip the trouble of downloading and uploading by just renaming the directory to the new name you want.
Creating a Copy
The easiest way to make a copy of your site on the same domain is to use Admin Panel -> Miscellaneous -> Clone Utility. If the copy needs to be on a different domain, you can follow the server move directions and simply omit the deletion of the old version.