Call: (209) 560-6611

Replace a text on every WordPress page and post using MySQL

Date: April 8, 2015 Author: ang Category: Tutorials WordPress Comments: 0
  1. Log into your cPanel.
  2. Click on 'phpMyAdmin' in the 'Databases' section.
  3. Navigate to your database on left hand side of the page.
  4. Click on the table named 'wp_posts'.

     

  5. Click the 'Export' tab at the top of your page and backup the table 'wp_posts', just in case we make a mistake and need to revert.
  6. Click on the 'SQL' tab.
  7. The the 'Edit' link in the top right hand side of the screen.
  8. In the text field (the query field) input
     MySQL |  copy code |? 
    1
    update wp_posts set post_content = replace(post_content,'rock','tree') 
    Note: This command will replace all the instances of the word 'rock' with the word 'tree' in all your posts and pages throughout your WordPress site. Replace the words 'rock' and 'tree' with the words you want to replace on your site.
  9. Click the 'Go' button to have MySQL process the change.

Leave a Reply

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

Before you post, please prove you are sentient.

what is 6 in addition to 4?

Before you post, please prove you are sentient.

What is 6 * 3?