So you need to change a link or text on your WordPress blog that repeats across many articles, pages or posts? No problem, follow my simple instructions to find text or html and replace or delete.

First be sure to backup your database!

  1. Open your Cpanel by logging into www.yourdomain.com/cpanel
    The username/password is normally the same as your FTP credentials
  2. Find PhpMyAdmin
    It has a sailboat logo
  3. Navigate to your wordpress database
    Usually wrdp
  4. Click on SQL
    This is a field to run sql statements
  5. Paste or type in the command below
    Change “text to find” with the text you are wanting to delete and “replace with this”. The single quotes mark the beginning and end of the text you are searching/replacing, so be sure they stay in the command.

UPDATE wp_posts SET post_content = REPLACE (
post_content,
‘text to find’, ‘replace with this’)

How to delete all content in field?

Say you want to delete all the content in a custom field that repeats in many posts, you can do this in PhpMyAdmin using a sql query as well. In the case below, I am deleting all the content in the excerpt of all my posts.

UPDATE wp_posts¬† SET post_excerpt = ”