Replace Content on Your WordPress using SQL


Sponsored Links






Like we all know, we can use SQL to replace or remove some content in our WordPress using phpMyAdmin, on this post I will show you How To Replace/Remove Content on Your WordPress using SQL. On this trick you can access trough phpMyAdmin on your server or using plugin WP-DBManager and you can direct access trough WordPress Admin panel.

Replace Content on Your WordPress using SQL

Replace Content on Your WordPress using SQL

The original source is come from Digging Into WordPress blog. Did you know what DigWP? is it wonderful WordPress books by Jeff Stars and Chris Coyier. Let’s move on, after you install DB manager or logging into phpMyAdmin, go to Run SQL interface and do this code

UPDATE wp_posts SET post_content = REPLACE ( post_content, 'nofollow ', '' );

On this sample, you will remove all content with nofollow on your post content. Please note you can multile SQL query to by using this method

UPDATE wp_posts SET post_content = REPLACE ( post_content, 'nofollow ', '' );
UPDATE wp_posts SET post_content = REPLACE ( post_content, ' nofollow', '' );
UPDATE wp_posts SET post_content = REPLACE ( post_content, ' rel="nofollow"', '' );

This method do the same think but multiple query executed in one time. You can tweak this code what ever you want, like replace wordpress.org with wptricks.net, so all your content with url to wordpress.org will be replaced into wptricks.net using this method

UPDATE wp_posts SET post_content = REPLACE ( post_content, 'wordpress.org ', 'wptricks.net' );

That’s all, I hope our tutorial replace or remove content on your WordPress using SQL worked on you, and don’t forget to get a copy of Digging into WordPress book

Photo Courtesy of Egotastic

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

How To Delete All WordPress Spam Comments Using phpMyAdmin

I have website that attacker more than 2000 spam each days. And I am so unhappy with it. I know I haven’t installed any Comment Preventing system.  The WordPress spam comment attack is pretty smart because it is definitely automated … Read More

The Best way to replace words in your posts

Like we all know, WordPress is the most promising publishing platform, it's free and easy to tweak or installed new themes or plugin. Or if we have little bit knowledge in PHP Programming we can enhanced our WordPress more easily. … Read More

Replace jQuery of WordPress with Google AJAX Library

I will show you little code How To Replace jQuery of WordPress in your Theme with Google AJAX Library, like we all know, WordPress has built in a lot of JavaScript Framework included jQuery, but for some reason such as … Read More

Another Ways Remove all nofollow attributes from comments

I has written some tutorial How To Remove nofollow on Comments Text. Today tricks I will give another ways to do it, with more complex code and of course better code than before. The ways to do this is simple … Read More

Remove nofollow attributes from comment text

WordPress added nofollow attributes on comment text url, this is bad for some commeter that needed some backlinks, if you want remove nofollow attributes from comment text in your WordPress site is easely, all need to do just added some … Read More

Deleted Post Revisions on WordPress and Meta Associated

WordPress introduces some new featured that called Post Revisions, if we keep on edit our post content, Post Revision will be created, and this is not good if you have a lot of Post Revision it's will increased your Databases … Read More

Replace Content on Your WordPress using SQL / WordPress Tricks & Tips

The original source is come from Digging Into WordPress blog. Did you know what DigWP? is it wonderful WordPress books by Jeff Stars and Chris Coyier. read more

Source: http://wptricks.net/replace-content-on-your-wordpress-using-sql/

WordPress Replace URL or Text in all Posts

In the following simple solution, I will show you how to replace all global occurrences of a URL link (or any other text) within your WordPress post content using SQL read more

Source: http://www.lancelhoff.com/wordpress-replace-url-or-text-in-all-posts/

limit post_content wordpress - WordPress Tricks & Tips

we can use SQL to replace or remove some content in our WordPress using phpMyAdmin, on this post I will show you How To Replace/Remove Content on Your WordPress using SQL. read more

Source: http://wptricks.net/archives/limit-post_content-wordpress?amp

Search and Replace in WordPress MySQL Database « Lorelle on WordPress

To search and replace text within your wp-posts table and the post-content field, click on the SQL tab and enter Do When Someone Steals Your Content; WordPress read more

Source: http://lorelle.wordpress.com/2005/12/01/search-and-replace-in-wordpress-mysql-database/

Remove/Replace Content from the WordPress Database | Digging into

A useful tool to have in in your WordPress toolbelt is the in this DiW article will help you find, replace, and delete specific text content using a few simple SQL commands. read more

Source: http://digwp.com/2010/03/remove-replace-content-wordpress-database/


4 Responses to Replace Content on Your WordPress using SQL

  1. Pingback: Find, Search, Replace, and Delete In A WordPress Database - WordCast

  2. Hi.
    Thanks for great post.Iam looking for plugin which can remove automatically posts after specific time since i have time limited offers and i dont want to keep them anymore after the end of that time!

    Thanks
    Hussam

  3. Pingback: The Best way to replace words in your posts | Jhez3R

  4. Online says:

    Thanks for info.. Your Information was very helpful for me.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>