Easily move content and code between WordPress sites. Pull your site's DB to a dev site, push new code to a staging site, etc.
Details for each step are covered in the sections below.
SitePush uses shell commands to do some of its stuff, so there is more chance of things going wrong than with most plugins. Please check that your set up meets these requirements, and even if it does, please test your setup thoroughly before pushing to a live site.
SitePush is currently well tested on:-
SitePush should work on Windows systems, but with the following caveats:-
If you would like to help make SitePush work better on Windows systems please let me know.
SitePush will not work in whole or in part:-
It has experimental support for Multisite installs:- * it will not run if you have WP_ALLOW_MULTISITE or MULTISITE defined as TRUE in your wp-config file unless you also define SITEPUSH_ALLOW_MULTISITE to TRUE in your wp-config file.
In addition to WordPress (3.3 or greater), PHP (5.2.4 or greater) and mySQL (5.0 or greater) your server must have the following installed:-
Different versions of your site must be on the same server (filesystem). You can setup different versions either in separate vhosts (normally recommended) or all in one vhost (won't work for multisite installs and may not work if you are using caching plugins).
For full details of how to do this, see the instructions for each method in the Server Setup section.
Download and install SitePush on one version of your site as per normal.
In most cases you will need to update the wp-config.php file for each site you are pushing to. Because you are likely running different versions of sites at different URLs, you need to tell WordPress to override the
WordPress Address and
Site Address options.
To do this, add definitions for the
WP_SITEURL constants in your wp-config.php file. For more information about this please see the WordPress codex.
In addition to configuring SitePush's settings page, you will also need to create and some settings files as described in this and the following sections. If at all possible upload these files outside of your web root so they are not accessible from a web browser. If that is not possible, make sure the file names end in '.php' and that you include the first line from the sample files.
The sites config file contains information about all the sites you wish to push/pull between. It looks like this:-
; <?php die('Forbidden'); ?> -*- conf -*- [all] wp_dir = /wp wp_content_dir = /wp/wp-content cache = no caches = /caches/timthumb caches = /caches/something_else [live] label = Live Site domains = live.example.com domains = live.example.co.uk web_path = /var/www/vhosts/mysite-live db = live live = yes [dev] label = Dev Site domain = dev.example.com web_path = /var/www/vhosts/mysite-dev db = dev live = no
Each section represents parameters for a web site, with the exception of [all] - parameters in this section apply to all sites. Required parameters are as follows:-
The following parameters are optional:-
Don't include a trailing slash on any paths.
The databases config file contains information about your sites' databases.
; <?php die('Forbidden'); ?> -*- conf -*- ; Do not remove the above line, it is all that prevents this file from being downloaded. [all] prefix = wp_ [live] name = live_database user = db_user pw = live_db_password [dev] name = dev_database user = db_user pw = dev_db_password
Each section represents parameters for a WordPress database, with the exception of [all] - parameters in this section apply to all sites. Required parameters are as follows:-
The following parameters are optional:-
NOTE All databases you are pushing to/from must use the same prefix.
If you are running a Multisite installation, you will also need to create a domain map file so that SitePush knows which domains apply to which sites. The file should have as many sections as you have SitePush sites defined in your sites config file, and each section should contain one entry for each blog in your multisite setup. If your multisite installation is set up as a subdomain install, then you should list the full domains for each site, for example:-
; <?php die('Forbidden'); ?> -*- conf -*- ; Do not remove the above line, it is all that prevents this file from being downloaded. [live] 1 = site1.example.com 2 = site2.example.com 3 = site3.example.com [dev] 1 = dev1.example.com 2 = dev2.example.com 3 = dev3.example.com
If, on the other hand, your installation is set up as a subdirectory install, then the domains in each section will be the same, for example:-
; <?php die('Forbidden'); ?> -*- conf -*- ; Do not remove the above line, it is all that prevents this file from being downloaded. [live] 1 = live.example.com 2 = live.example.com 3 = live.example.com [dev] 1 = dev.example.com 2 = dev.example.com 3 = dev.example.com
** do not include the subdirectory path for each site **
If you do not configure this correctly, you will not be able to access blogs where you have pushed multisite tables (or if you pushed the whole database) and may have problems accessing individual blogs where you pushed options for that blog. If this does happen, you will need to manually edit the wp_blogs, wp_site, wp_sitemeta and options tables, or restore from a backup.
Requires: 3.3.1 or higher
Compatible up to: 3.6.1
Last Updated: 2013-9-9
Active Installs: 800+
1 of 4 support threads in the last two months have been resolved.
Got something to say? Need help?