A set of bash commands to power your WordPress.
Uses the amazing WP-CLI !
Go to your favorite tools folder :
git clone https://github.com/WordPressUtilities/wputools
Add CLI shortcut :
. wputools/inc/installer.sh;
wputools adminer;
wputools archivelogs;
wputools anonymizedb;
wputools backup;
wputools backup -t "y";
wputools backup -u "y";
wputools bduser;
wputools login;
wputools wpconfig;
wputools cache;
wputools cachewarm;
wputools clean;
wputools codechecker;
wputools importsite conf.sh;
wputools debugfile;
wputools diagnostic;
wputools detecthack;
wputools cleanhack;
wputools dbexport https://github.com;
wputools dbimport dump.sql;
wputools go mu-plugins;
wputools duplicatemenu;
wputools generatemenus;
wputools wpuwoo import-csv file.csv
wputools wpuwoo import-export-post export 10
wputools wpuwoo import-export-post import 10
wputools mu-plugin wpu_file_cache;
wputools nginx-convert;
wputools plugin wpuloginas;
wputools settings;
wputools sample;
wputools sandbox;
wputools src;
wputools self-update;
wputools update;
You can add a wputools-local.sh
file at the root of your WordPress install or in the folder above.
#!/bin/bash
# Arguments for CURL if the site is password protected
_EXTRA_CURL_ARGS="-u user:password";
# Static home URL if needed
_HOME_URL="http://example.com";
# Site name if needed
_SITE_NAME="MYSITENAME";
# URL replace format to trigger a search-replace after dbimport
_WPDB_REPLACE_BEFORE="http://example-before.com";
_WPDB_REPLACE_AFTER="http://example-after.com";
# BACKUP DIRECTORY
_BACKUP_DIR="~/MYBACKUPDIR/";
# DISABLE BACKUP FOR UPLOADS
_BACKUP_UPLOADS="n";
# IGNORE LOCALOVERRIDES WHEN IMPORTING
_WPUTOOLS_DBIMPORT_IGNORE_LOCALOVERRIDES='1';
# DISABLE BACKUP FOR CRONTAB
_NOBACKUP_CRONTABS="1";
# CORE UPDATE TYPE
_WPUTOOLS_CORE_UPDATE_TYPE="major";
# EXTRA CACHE DIRECTORIES
_EXTRA_CACHE_DIRS=(wp-content/uploads/wpufilecache)
# Override WP-CLI Version or PHP binary
_PHP_COMMAND='/Applications/MAMP/bin/php/php5.4.45/bin/php';
_WPCLICOMMAND(){
$_PHP_COMMAND $_WPCLISRC $@;
}
# Clean some folders before backup with uploads
function wputools_backup_uploads_cleanup(){
rm -rf "${1}/wpufilecache";
}
- To @JulioPotier for https://github.com/JulioPotier/SecuPress-Backdoor-User