When developing WordPress themes for a site with a large amount of posts, how can I dynamically pull existing post data from the live version of the site onto my testing site? I already know about WordPress’s export feature, but that’s one-and-done, not dynamically queried.
- Plan A:
- Proposed Solution:
- Create read-only user in live site’s database
- PRECAUTION: change test site’s prefix from “wp_” to “test_”
- Problems:
- Settings (like current theme) on test site cannot be changed, thanks to read-only user
- No posts found in “test_posts”, even though I’d like it to search “wp_posts”
- Proposed Solution:
Is there an easier way or existing solution to avoid rewriting WordPress system files on the test site? I’d really rather not rewrite WordPress’s database interface…
just duplicate the DB, re-name and call DB in wp-config!