These Bash scripts automate some usual tasks working with Wordpress, and Nginx/MariaDB backend. The scripts are usefull on a clean Debian Jessie installation and surely they don't work on Ubuntu so far. It's advise to not install before running install script by first time an Apache or other HTTP server, unless they are listening at any port except port 80, so they could may cause conflicts with Nginx.
Install a Wordpress instance on local.
First change mod permissions of file to execute script, then:
./install_wordpress.sh
Some parameters are needed. They must be defined in /conf/config
file.
domain=
title=
mysql_root_pass=
wp_path=
wp_charset=
wp_locale=
wp_admin_user=
wp_admin_password=
`wp_admin_email=``
`wp_db_host=``
wp_db_user=
`
wp_db_password=
`
wp_db_name=
wpcli_user=
Uninstall local Wordpress installed with the above script. It's more than probable that script weren't work in other cases.
Simply:
./uninstall_wordpress.sh yourdomain.org
Only a FQDN domain name is needed as parameter. Script takes the rest of parameters, such the database name, from wp-config.php
and Nginx's available sites.
Backup database, files and Nginx's site configuration via SSH to a remote folder. A pair of SSH keys is highly recommended. If you need some help to use them, this tutorial is a good first step.
./backup_wordpress.sh
Defined in /params/backup.conf
domain=
backup_user=
backup_host=
backup_remote_dir=
Restored a site backed with the previous script.
./restore_wordpress
Defined in params/restore.conf
domain=
backup_user=
backup_host=
backup_remote_dir=