hunner/puppet-wordpress

Cannot downgrade an existing wordpress deploy

Opened this issue · 3 comments

Hi,
I notice that when I have an existing wordpress deployment, and I want to use the wordpress module to downgrade the deployment, that it does not work. It looks like downloads the specified version, but does not extract the zip file. It looks like this is due to the extract having a creates parameter that prevents extraction of the ${install_dir}/index.php file exists.

I can delete this file in an earlier provisioning step (using shell) but I am wondering if there is better way to achieve this.

Thanks,
John Schank

Hi,

I don't think you have a better way to do it with this module, and i wonder if downgrading wordpress with a puppet recipe is a good idea (what happens with the database and plugins installed?)

Perhaps yo could install wordpdress in another folder, migrate manually (or using a custom script to copy data and files) and then remove the previous installation?

thanks for the reply enekogb,
You're correct, there might be problems with the database. But in my case, I've built a basebox which already has wordpress on it, and I've snapshotted the configuration to make life easier for my developers and my QA team. Attempting to downgrade works, so long as I have a provisioning step that removes the index.php file. Then the downgrade will proceed. If there is a problem with the database, then I believe I can just drop the wordpress database, and then logging into wordpress will initiate the 5 minute install. Perhaps an override would work. Something to force the downgrade if there is a previous instance.

Hi,

In a similar scenario (not using Wordpress thought) i developed a simple
mcollective agent that deletes the index.php file, so i could run the
upgrade from my puppet master.

https://docs.puppetlabs.com/mcollective/simplerpc/agents.html

I you have more than one machine, perhaps you can do something similar.

You can also install WP-Cli (http://wp-cli.org/) so you can reinstall
wordpress database from the shell or a shell script ;)

2015-02-16 22:43 GMT+01:00 John Schank notifications@github.com:

thanks for the reply enekogb,
You're correct, there might be problems with the database. But in my case,
I've built a basebox which already has wordpress on it, and I've
snapshotted the configuration to make life easier for my developers and my
QA team. Attempting to downgrade works, so long as I have a provisioning
step that removes the index.php file. Then the downgrade will proceed. If
there is a problem with the database, then I believe I can just drop the
wordpress database, and then logging into wordpress will initiate the 5
minute install. Perhaps an override would work. Something to force the
downgrade if there is a previous instance.


Reply to this email directly or view it on GitHub
#64 (comment)
.