0

Lets say I launch a new WordPress site at a hosted provider such as WPEngine. As I start to configure my site (install a template, install plugins, create layout and content for my pages, etc.), is there a good way to record what I'm doing in code or otherwise codify and centralize those modifications so that it is repeatable? By repeatable, I mean that I can launch a fresh/new site, run my code, and functionally I'll have the same site that I configured by-hand? I'm also happy with a solution that requires some items to be done "by-hand" in between running code. In the extreme I could just take very good notes about what I'm doing and then repeat that process by-hand, but it would be very slow to inflate a new site.

I would be surprised if this question hasn't already been asked/answers, but there are so many articles written about WordPress it's hard to find the needle in the haystack.

1

This sounds like a perfect use case for WP CLI, all you need is SSH access, which many major hosts now provide. Many of the features you are asking for are already provided out of the box. For others you should be able to create your custom WP CLI commands.

Some examples from the doc:

# Install the latest version from wordpress.org and activate
$ wp plugin install bbpress --activate

# Install the latest version of a theme from wordpress.org and activate
$ wp theme install twentysixteen --activate

# Create post with content from given file
$ wp post create ./post-content.txt --post_category=201,345 --post_title='Post from file'

Ivelina Dimova just gave a great lightning talk about the WP CLI at WordCamp Europe, even though I am not finding the presentation online right now.

| improve this answer | |
  • very cool! this is exactly the sort of thing I was looking for – SFun28 Jun 19 '17 at 11:55
  • @SFun28 If you don't have any more questions on this specific topic and feel I fully answered your question, please consider marking the answer as "accepted" – kero Jun 19 '17 at 13:57
  • I'm keeping this question open to gather more ideas for a little while, but I did upvote! – SFun28 Jun 19 '17 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.