Moving a Site

Exporting and installing using the Profile Exporter is only properly meant for new installations based on a profile set up and not as a way of moving a complete site that has been fully developed. Although profiles are a complete record of the site, they do not hold user data as it would be expected that users would be created as part of a new install.

It is recommended, therefore, that a fully developed site is packed up and moved manually from server to server - which is very easy!

Step 1 - Export the database.

Using your favourite MySQL management utility (like PhpMyAdmin), export the ProcessWire database with all tables to a .sql file.

Step 2 - Pack up the site

Archive the contents of your site folder to include the /site/ directory, the /wire/ directory, the .htaccess file and the index.php file.

Step 3 - Create a new database

On the new server, create a new database using any name you wish. You should also create a new, unique MySQL user and password. If you are using something like CPanel, the wizard will walk you through the procedure.

Open your database manager and import the entire contents of the .sql file you made earlier.

Step 4 - Upload and unpack the archive

Upload the archive you made to your server, into the folder you wish your site to be in. Unpack the archive. Within your web folder, you should now see the /site/ and /wire/ directories, the .htaccess file and the index.php file.

Step 5 - edit the config file

Open the /site/ directory and edit the config.php file.

Change the database name, username and password to match your new database.

You may also need to change the $config->httpHosts array to suit your new host.

And that should be that!

Paths to Images

If a site has been developed in a sub-directory, but then is moved to the root directory on the production server, images inserted via a rich text editor may now have the wrong paths.

Generally it is best to develop the same way as you host - so develop in root if the production site will be root, which is normal.

However, you can correct the problem by loading the .sql file into a decent text editor and doing a search and replace - for instance, search for "/subfolder/" and replace with "/"

Now import the SQL file and the problem will be solved.

Next: Troubleshooting installations »

  1. Installation, Moving and Troubleshooting
  2. Pre-installation checks and tasks
  3. Basic Installation
  4. Installing with a third party Profile
  5. Moving a Site
  6. Troubleshooting installations
  7. Host Specific Installation