The old WP script that I created and maintained has been dramatically altered. It handles more scenarios and it works in more environments. The script will handle domain name changes, site cloning, wordpress installation, wordpress update, safe file permission setting, site and associated DB deletion, wordpress file and DB backup, and temporary wordpress user password changes. Usage information follows.
======================= WordPress Manager 3.1 ======================= rename change the domain name but leave everything else alone example wpm rename dev.example.com example.com /var/www/html copy copies a site from one domain and docroot to another example wpm copy dev.example.com example.com /var/www/dev /var/www/html install just installs wordpress to a given directory. example wpm install example.com /var/www/example.com update updates a wordpress install example wpm update /var/www/html permissions resets a wordpress install's permissions for files/directories example wpm permissions /var/www/html delete removes docroot, user, and database example wpm delete /var/www/example.com example wpm delete /var/www/example.com b (delete, but backup first) backup creates a backup in /var/www/backup example wpm backup /var/www/html example wpm backup /var/www/html n (dont compress backup) example wpm backup /var/www/html d (delete older backups) example wpm backup /var/www/html n d (delete old and dont compress) temppass temporarily change a wordpress user's password (default 10 minutes, and username admin) example wpm temppass /var/www/example.com (change admin's pass for 10 minutes) example wpm temppass /var/www/example.com 60 (change admin's pass for 60 seconds) example wpm temppass /var/www/example.com 5m bob (change bob's pass for 5 minutes) NOTICE if you pass a name, you must first pass a time limit
If you wish to get WPM and use it, you can download it. You will uncompress with xz doing something like
xz -d < wpm31.xz > /usr/local/bin/wpm
chmod +x /usr/local/bin/wpm
The script will grab its hard dependencies if they are missing. The script is licensed under the Licentiam Absurdum.
© MMIX - MMXX, absurd.wtf