App-WordPressTools
view release on metacpan or search on metacpan
# view usage information
wp-tools --help
# common usage
wp-tools upgrade|backup|restore OPTIONS...
DESCRIPTION
WordPress Tools is a set of tools that allow you to backup, restore,
and upgrade WordPress sites. The tools are especially useful for
upgrading very outdated sites and for scripting the backing up and
upgrading of many sites.
WordPress Tools was built to make the Internet more secure. A huge
number of websites on the Internet use WordPress
<https://wordpress.org/>, because it's awesome, but a large portion of
those sites do not run the latest version of WordPress which makes them
susceptible to hacking. WordPress Tools can be used to get those sites
up-to-date again, and that makes the whole Internet more secure.
The code has been used in production and has already upgraded over two
million WordPress sites, but it has little real-world testing outside
of Linux at this point so your mileage may vary if you have a different
operating system. Stay tuned as we add support for more platforms, and
please contribute if you feel like it.
The command-line program also has a lot of options for managing server
load, so you can upgrade your sites without killing your server.
INSTALLATION
There are several ways to install WordPress Tools to your system.
Make sure you have WP-CLI <http://wp-cli.org/> and the other
"DEPENDENCIES" installed.
Using cpanm
You can install WordPress Tools using cpanm. If you have a local perl
(plenv, perlbrew, etc.), you can just do:
cpanm App::WordPressTools
to install the wp-tools executable and its dependencies. The executable
will be installed to your perl's bin path, like
~/perl5/perlbrew/bin/wp-tools.
If you're installing to your system perl, you can do:
cpanm --sudo App::WordPressTools
to install the wp-tools executable to a system directory, like
/usr/local/bin/wp-tools (depending on your perl).
Downloading just the executable
You may also choose to download wp-tools as a single executable, like
this:
curl -OL https://raw.githubusercontent.com/bluehost/wp-tools/solo/wp-tools
chmod +x wp-tools
This executable includes all the non-core Perl module dependencies
built-in.
For developers
If you're a developer and want to hack on the source, clone the
repository and pull the dependencies:
git clone https://github.com/bluehost/wp-tools.git
cd wp-tools
cpanm -n Dist::Zilla
dzil authordeps --missing |cpanm -n
dzil listdeps --author --develop --missing |cpanm -n
DEPENDENCIES
WordPress Tools requires these other programs and libraries in order to
do its work. You probably have most of these on your system already,
and the cpanm method of installing wp-tools will handle the Perl module
dependencies for you.
* WP-CLI <http://wp-cli.org/>
* GNU Coreutils <https://www.gnu.org/software/coreutils/>
* GNU Tar <https://www.gnu.org/software/tar/>
* awk
* grep
* mysql (MySQL server client)
* procps
* Various Perl modules (see the distributed cpanfile file for a list)
OPTIONS
--help
Show usage information and exit.
--force
If there are any resource limits in effect, ignore them and do the
command anyway.
--max-count=num
Delete the oldest backups, keeping the number provided (default: 5).
--max-dproc=num
Refuse to execute if the maximum number of defunct processes on the
system exceeds this number (default: 100).
--max-load=num
( run in 0.977 second using v1.01-cache-2.11-cpan-39bf76dae61 )