NPIRE Dev tools
A collection of bash scripts that help me manage all my WordPress installations. These scripts are built around wp-cli and my local web server.
These scripts are highly customized for my workflow and I use most of them on a daily basis.
- npire-dev: copy live files and database to local dev state; this way I can quickly update my local dev state with the latest changes from the live server
- npire-preview: copy local dev state to a preview server, so the client can view the page before it goes live; the url and database name are based on the current git branch (or a specific name that is set via a command line switch), so multiple states of the same website can exist on the preview server
- npire-repo: wrapper for my own git server to manage backups of my git repos
- npire-wp-init: install WordPress in the current folder and set up some specific settings and plugins, as well as clean up some of the base stuff that comes with WordPress
- npire-wp-url: change the URL of the WordPress installation in the current folder; defaults to the local dev environment URL; this script gets used by npire-dev and npire-preview
- npire-cname: change the local dev URL based on the current WiFi my laptop is logged in; this script gets executed automatically when I switch the WiFi, so that the local dev URL always points to my laptop when I'm at home or in the office so that other people can live-view the changes I make
- npire-deploy: deploy the current branch to the live server, but retain the earlier version on the server (this essentially creates a new subfolder, and then points a symlink to the new folder, while retaining the old folder); this gets only used by a few very large websites
- npire-fixpermissions: a quick way to fix some file/folder permissions after copying stuff from suboptimal hosting solutions
- npire-goto: cd into the project folder, the WordPress folder or the theme folder of a specific project