database - Importing New Posts from Live Site into Local Dev Site

I'm currently developing an updated version of a live site in a local environment. It's a very large site and

I'm currently developing an updated version of a live site in a local environment. It's a very large site and the local dev site is using a entirely new theme without many of the live site's plugins or functionality. The live site uses Avada Fusion and almost all content is wrapped in shortcodes forcing me to basically re-publish each post manually using the dev site's new setup (using ACF Pro, custom fields). I've spent weeks removing the live site theme, unnecessary thumbnails, plugins, and all sorts of space hogging files. The only problem is bringing in the new posts from the live site. They are adding new posts weekly and I'm about 25 behind. :)

Is there a way to export/import the new posts from the live site into the local dev site that would include all the posts' featured images, galleries within the post, etc? This would only be for posts, and I would love to pull from a specific date like May 15 to Current.

I attempted the standard Tools > export/import and it added the posts ok but it didn't include featured images or any of the images within the posts. I'm curious about plugins like WP Migrate DB Pro and their merge feature but I don't want to overwrite or add back any of the images I've painstakingly removed or regenerated with lossless compression.

I'm currently developing an updated version of a live site in a local environment. It's a very large site and the local dev site is using a entirely new theme without many of the live site's plugins or functionality. The live site uses Avada Fusion and almost all content is wrapped in shortcodes forcing me to basically re-publish each post manually using the dev site's new setup (using ACF Pro, custom fields). I've spent weeks removing the live site theme, unnecessary thumbnails, plugins, and all sorts of space hogging files. The only problem is bringing in the new posts from the live site. They are adding new posts weekly and I'm about 25 behind. :)

Is there a way to export/import the new posts from the live site into the local dev site that would include all the posts' featured images, galleries within the post, etc? This would only be for posts, and I would love to pull from a specific date like May 15 to Current.

I attempted the standard Tools > export/import and it added the posts ok but it didn't include featured images or any of the images within the posts. I'm curious about plugins like WP Migrate DB Pro and their merge feature but I don't want to overwrite or add back any of the images I've painstakingly removed or regenerated with lossless compression.

Share Improve this question asked Jul 5, 2020 at 17:18 jdashleyjdashley 233 bronze badges 1
  • Strange, it should pull all the images from the live site when importing to localhost - check that the image URLs are present in the XML file: wordpress/support/topic/tools-export-media – montrealist Commented Jul 8, 2020 at 2:17
Add a comment  | 

2 Answers 2

Reset to default 0

Have you considered to use REST API to bridge the two environments?

Basically you need to hit the posts endpoint https://example/wp-json/wp/v2/posts using the after argument that permit to limit response to posts published after a given ISO8601 compliant date.

With the response you can insert new posts and sync the two installation.

More detail about the endpoint and the arguments can be found here https://developer.wordpress/rest-api/reference/posts/

Thank you for the responses. I was able to get it handled by using a plugin.

https://wordpress/plugins/export-media-with-selected-content/

I'm going to look into the REST API solution for keeping it up to date while I continue the development side of the project.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742274015a4413244.html

相关推荐

  • database - Importing New Posts from Live Site into Local Dev Site

    I'm currently developing an updated version of a live site in a local environment. It's a very large site and

    23小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信