Bulk “Find And Replace” WordPress Posts Via PhpMyAdmin

phpMyAdmin WordPress Post Mass Replace
This is a post about how to make a mass change in wordpress posts, in familiar application ie Ms.Word, it called “find and replace’ :). Before do this action, you should familiar with phpMyAdmin and mySQL and backup your database first so you will able to restore to the previous data if you make a mistake while execute the query.


Bulk Find and Replace WordPress Posts via phpMyAdmin

How to Bulk “Find and Replace” WordPress Posts via phpMyAdmin

Follow these steps to make mass replace on wordpress post (or other table):

  1. Go to phpMyAdmin.
    If you are using cPanel hosting, find menu phpMyAdmin, the you will directed to the phpMyAdmin page.
  2. Select the database you want to make data replacement.
    If you have only one database, it will be easy to select. If you have many database and use worpress autoinstaller then you must define the correct database. Check your wp-config.php in File Manager and define the database name.
  3. After selecting the database, go to SQL menu and type this query:
    UPDATE wp_posts SET post_content = REPLACE (post_content,'old text','new text');
    Change the old text with the data text you want to replace and change the new text with new data text for replacement.
  4. Execute the query by clicking the Go button. Done…

This mass find and replace query code can be used for general mySQL database with the following format:
UPDATE table_name SET field_name = REPLACE (field_name,'old item','new item');
Field and Table WordPress wp_posts

Leave a Reply