sitepush icon indicating copy to clipboard operation
sitepush copied to clipboard

Suggestion: add more granular content publishing support

Open cdatwood opened this issue 11 years ago • 3 comments

It would be fantastic to be able to select between posts, pages, and individual custom post types to publish (e.g. I am working on adding a blog post, two new pages and new alerts (custom post type), and my blog post and custom post type aren't done yet, but the two new pages are published and ready to be pushed to the live site).

Other than that, I really like how the plugin operates.

cdatwood avatar Jun 11 '13 15:06 cdatwood

Thanks for the suggestion. I agree it would be nice, but as it stands SitePush just pushes the whole wp_posts table, so splitting it up would need some significant changes the code.

IMHO a better (though equally complicated code wise) way to do this would be to allow SitePush to push individual posts. When saving a post on dev/staging site, you would indicate that this post should be pushed next time SitePush is run, that way you can push whatever you want.

That's on my to do list, but not imminent (unless someone else wants to propose the code).

rowatt avatar Jun 11 '13 16:06 rowatt

It would be interesting to see that proposed functionality on an individual, group (selecting arbitrary post IDs to be published, may not all be the same content type or select several of one content type, and use the bulk menu), and perhaps a branch basis (a page and all of its sub-pages) basis.

A simple reference table with the post ID, and a publish/not publish flag could be interesting (so content that isn't marked as changed doesn't get updated). That way it could start as "Push only things that are new or changed," and then develop into "Push things that are new or changed, and have a push flag == 1." I guess this would infer that any publish function would have to set that flag to true, and then it could be deselected and set to false.

nod I'm no developer, but I may be able to help come up with the logic required to do so, and write up some quick pseudo-technical specs for the procedures. It may help get that down the road a bit faster, if that would assist in development of the feature (believe me, my code would be disastrous on its own).

cdatwood avatar Jun 11 '13 16:06 cdatwood

What you say makes sense and in theory is all doable. The UI challenge is making it flexible enough without being too complex.

The hard bit, though, is rewiring SitePush's internals to push anything other than whole database tables. In principle, it's not such a difficult thing to do, but not something I have time for right now, alas.

I'll let you know here as/when I am able to spend some more time on this.

rowatt avatar Jun 11 '13 18:06 rowatt