Deploy/Roll Back WordPress Website

Recently I developed a website using WordPress after I’ve finished I been tasked to create a deployment script so they can easily poll the code from repository (they were using self hosted SVN) and deploy it on the server easily.

I was new to bash script — after many research I came up with the script.

The script is easy enough to use all you need is to run this command

deploy EVIRONMENT_NAME SVN_TAG_NAME

for roll back you run

deploy rollback ENVIRONMENT_NAME CURRENT_ENV ROLLBACK_ENV

the script is expect you to have upload folder outside the wp-content on the root and to have wp-config.php copied outside the www/