最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Updating Posts table in database without overwriting user generated content

matteradmin50PV0评论

I'm trying to come up with a local development workflow for wordpress that actually works. I'm pretty new to this whole thing but I'm surprised this is so complicated. So far I've been using Git and WP Migrate DB, but that no longer will cut it after launching the site.

Under another question it's suggested that one should never make database changes on a staging environment. This seems absurd to me, since that would make any meaningful change impossible outside of isolated plugin or theme updates. Doesn't this defeat the whole purpose of having a local dev environment? What if I need to change the front page or the menu or anything really?

I could simply use WP Migrate DB or some similar tool if Wordpress wouldn't store everything but the kitchen sink in the same Posts table. Is there a good way to update some post-types while leaving other (user generated) post types intact? WP Migrate DB has an "ignore post types" feature but apparently that still overwrites everything on the other side, so it's not very useful.

I really don't want to end up with manual exports and pages long mysql queries in order to avoid directly editing the live site on a daily basis. Both seem to be terrible ideas.

Post a comment

comment list (0)

  1. No comments so far