admin管理员组文章数量:1305184
Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import - How?
- Is there an easy quick way to do this? To delete all Pages, Posts, Comments and stuff that got imported?
- Or some way to force a FLUSH of the information when I import a new .XML?
- I've imported a bunch of wrong content into several sites
- I would like to give them a FRESH start, preferably without having to Re-Create Fresh Sites on Multisite WP 3.5.1 Network
- Make it go back to the state when a Fresh New Site was created
With relation to other links I've read:
- Import and replace existing page/post content
- Can I overwrite existing posts with Import tool?
- How do I re-import overwriting all posts/comments?
- Wordpress Import Function
- Import and replace existing page/post content
- Is there a way to trigger an automatic import of a WP backup on creation of a new WP multisite site?
I haven't gotten a conclusive answer here. Not even when I put together all the LEARNING from the links I've read (posted).
Is there a way to combine all the above knowledge to create solution steps for this?
Shouldn't there be a Plugin, Script or some Tool in the Wordpress Admin/ Developer's Tool chest to do this sometime when needed?
Is there something like this out there?
Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import - How?
- Is there an easy quick way to do this? To delete all Pages, Posts, Comments and stuff that got imported?
- Or some way to force a FLUSH of the information when I import a new .XML?
- I've imported a bunch of wrong content into several sites
- I would like to give them a FRESH start, preferably without having to Re-Create Fresh Sites on Multisite WP 3.5.1 Network
- Make it go back to the state when a Fresh New Site was created
With relation to other links I've read:
- Import and replace existing page/post content
- Can I overwrite existing posts with Import tool?
- How do I re-import overwriting all posts/comments?
- Wordpress Import Function
- Import and replace existing page/post content
- Is there a way to trigger an automatic import of a WP backup on creation of a new WP multisite site?
I haven't gotten a conclusive answer here. Not even when I put together all the LEARNING from the links I've read (posted).
Is there a way to combine all the above knowledge to create solution steps for this?
Shouldn't there be a Plugin, Script or some Tool in the Wordpress Admin/ Developer's Tool chest to do this sometime when needed?
Is there something like this out there?
Share Improve this question edited May 23, 2017 at 12:40 CommunityBot 1 asked Jan 25, 2013 at 13:03 Alex SAlex S 1331 silver badge7 bronze badges2 Answers
Reset to default 2This may be what you're looking for http://wordpress/extend/plugins/suicide/. As a super admin you can select which sites you would like to remove the content from within your multisite setup.
Run A Query to Delete All posts before Import
Because menus and pages are custom post types, this will update all posts, pages, and menus to be replaced by your import file.
- Delete all posts in the target server by running a database query. Note that the code requires setting a userid. modify it if there are more users or run it more than once.
SET @WPUSERID='1';
-- end config
-- DELETE a , b , c FROM wp_posts a
-- LEFT JOIN
-- wp_term_relationships b ON (a.ID = b.object_id)
-- LEFT JOIN
-- wp_postmeta c ON (a.ID = c.post_id)
-- WHERE
-- a.post_author = @WPUSERID;
(uncomment lines after the --end config
, by deleting the leading --
In order to run the query. But be careful, it is destructive. See the query below on how test your query to see what will be deleted, before you run it.)
- Import the XML file to the target.
Caution: Back up your databases for both servers in case you accidently get them mixed up (you think you're connected to stage for example, and you are really connected to dev when you do the delete) .
Be safe: view posts before deleting
SET @WPUSERID='1';
-- end config
SELECT
*
FROM
wp_posts a
LEFT JOIN
wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN
wp_postmeta c ON (a.ID = c.post_id)
WHERE
a.post_author = @WPUSERID;
本文标签: pluginsSome way to Flush or Overwrite all Imported Content in a Site for a Fresh ImportHow
版权声明:本文标题:plugins - Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import - How? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741799134a2398117.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论