Hello,
I have 2 wordpress environments 1 for dev and 1 for live. What is the best way to transfer pages between the 2 without having to recreate the page using the plugin in the live environment?
Hello,
I have 2 wordpress environments 1 for dev and 1 for live. What is the best way to transfer pages between the 2 without having to recreate the page using the plugin in the live environment?
Hey Dan,
You should just be able to use the Export/Import feature from WP. Although you’ll want to run a Serialized Search and Replace on your site after doing so. You can also use the plugin Better Search Replace as it’s based on the same script. And, as always, it’s always a good idea to create a backup of your DB before doing any modifications to it.
Ben
Hmm, so I can export individual pages? I’ll look into that I thought it was ALL pages.
Also can you explain why I need to do search and replace after importing?
Hey Dan,
If you only want to import select pages only, you can save them as templates and export the templates instead. Or you could play around with the page export filters.
You’ll need to run the script since after importing the pages, all URLs from images, links, background images, and other resources will still be from the old site. You also need a search and replace script that handles serialization since BB saves data on a serialized array.
Ben
Thanks for the explanation!
After importing the template, would I create the page from template and then delete the template?
Hey Dan,
No worries! And that is the case, you’ll have to apply the template to a page, then delete the templates if you don’t wish to reuse them.
I did a bit of research and there are some workarounds I’ve read that might work out for you. Check out the link below.
http://www.linkbrightmedia.com/how-do-i-export-a-single-wordpress-post-or-page/
There’s also this plugin that could do it but it hasn’t been updated in the last 2 years. I guess use it at your own risk.
https://wordpress.org/plugins/wp-exporter/
Hope this helps!
Ben