Wp Clone to Dev Plugin

  • I don't know if there are still people reading here.


    I have an idea that should be written in a plugin, but I don't have the knowledge to code it.
    Right now I'm doing a part manually and a part with a shell script I invoke manually in command line


    The manual part :
    - create a second database with _dev at the end
    - assign the same user to this database
    - create a subdomain dev.DOMAINNAME


    Those operations should have been done using the CLI Command for IMSCP but they are not available anymore. I'm sure there is a possibility to do this using a button in a plugin.


    Then I call a shell script (this is the raw script, no control done, should be added (is the DB Dev available, is the DEV subdomain available, etc...)


    The 13th and 14th line just add the site to my wordshell list of sites and the 15th make a search and replace in the database to change all the url link to the dev site.


    I'm sure a lot of people hosts Wordpress sites.
    It's really interesting to have this feature before doing some change to a website, to have an instant clone of the website to be able to work on the dev stage.


    After the changes made, I don't know what's the best way to do.
    Either perform the same push from dev to prod (risk : there are some changes in prod between your dump and you GoToLive)
    Either you know those changes are ok, you can do the same in prod (risk : you don't make the change the exact same manner and you fail)


    So I think it could be an interesting plugin.


    Cedric