admin管理员组文章数量:1124169
I have two WordPress sites, one (the "main") is used for my org's website (using Pages + Media), and a second was setup as a blog (using Posts + Media).
We want to get rid of the blog WordPress site and move all the posts and media to the main WordPress site.
I've exported posts from the blog using Tools -> Export.
Then I use Tools -> Import on the main site to import the posts, and I select "Import Attachments: Download and import file attachments" (I check the box).
But then when I go look at the posts that are brought in, they are still pointing to the old site (perhaps because it's a subdomain of the main site, even though it's hosted elsewhere? Is there a dumb string comparison that is failing here?)
So then I thought maybe I could export/import all of the media (thousands of photos) and just use a script to edit the XML so that it points to the media on the main site, but when I try to export/import all the media it keeps crashing after doing just a few, presumably because of upload size limitations?
What's the proper way to do something like this?
I know there are lots of plugins that do backup/restore, but I don't want to do one of those unless I can select which portions it restores, and also know that it won't delete what is already there.
The main site has pages and media, and the blog site has posts and media. I want to bring over all the blog media and posts, without losing any of the main site pages and media. Is this possible?
I have two WordPress sites, one (the "main") is used for my org's website (using Pages + Media), and a second was setup as a blog (using Posts + Media).
We want to get rid of the blog WordPress site and move all the posts and media to the main WordPress site.
I've exported posts from the blog using Tools -> Export.
Then I use Tools -> Import on the main site to import the posts, and I select "Import Attachments: Download and import file attachments" (I check the box).
But then when I go look at the posts that are brought in, they are still pointing to the old site (perhaps because it's a subdomain of the main site, even though it's hosted elsewhere? Is there a dumb string comparison that is failing here?)
So then I thought maybe I could export/import all of the media (thousands of photos) and just use a script to edit the XML so that it points to the media on the main site, but when I try to export/import all the media it keeps crashing after doing just a few, presumably because of upload size limitations?
What's the proper way to do something like this?
I know there are lots of plugins that do backup/restore, but I don't want to do one of those unless I can select which portions it restores, and also know that it won't delete what is already there.
The main site has pages and media, and the blog site has posts and media. I want to bring over all the blog media and posts, without losing any of the main site pages and media. Is this possible?
Share Improve this question edited Mar 12, 2024 at 13:50 Tony Djukic 2,2594 gold badges18 silver badges33 bronze badges asked Mar 12, 2024 at 1:35 David Ljung Madison StellarDavid Ljung Madison Stellar 1313 bronze badges1 Answer
Reset to default 0I understand your hesitation to use a plugin that doesn't have granular options to avoid overwriting existing content when what you're actually doing is a merge more than a restore.
You could simply use phpMyAdmin perform a search & replace on the incorrect links via a SQL query. I'd suggest cloning what you have now (merged content with links pointing incorrectly) to a sandbox installation to test this first, or if that's not possible then be sure to backup your full DB, just in case you have unexpected results.
If you're not comfortably familiar with writing SQL queries, then I'm sure there are others who could help with suggestions (I always need to research writing queries very carefully first!).
Alternatively there are plugins that do just specifically that - search and replace text strings (in this case, links) - in a simpler interface than using phpMyAdmin and writing the SQL query yourself.
本文标签: importCopy all media from one WordPress site to another
版权声明:本文标题:import - Copy all media from one WordPress site to another 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736617736a1945508.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论