Skip to main content
Backup the existing site
- Lookup DB credentials: <site-root>/wp-config.php
- Backup database: mysqldump --opt --user=<db_username> -p <db_name> > ~/<sitename>/<db_name>.sql
- Backup the site: rsync -aP /var/www/sites/<sitename> ~/
Setup new site
- Download new version from wordpress.org
- Upload to server: rsync -zaP wordpress*.tar.gz <servername>:
- Untar the tarball.
- Copy the directory into the ~/<sitename>/<sitename>.new folder: cp -a ~/wordpress/ ~/<sitename>/<sitename>.new
- Copy the old wp-content directory into the new folder.
- Overwrite files in new/wp-content with a new copy from the original download, preserving the existing files from the old site.
- Merge changes in old/wp-config.php with new/wp-config-sample.php and put the result into new/wp-config.php
- Download updated plugins and put them into new/wp-content/plugins
- Download updated themes and put them into new/wp-content/themes