How to Easily Change Content in Multiple Posts


It happens from time to time that the author of a blog realizes that a certain sentence is grammatically or stylistically incorrect. Even worse the sentence has been in use for a while and replacing it manually in each post would be extremely time consuming.

What to do? The answer is very simple — use SQL.

SQL is an acronym that stands for Structured Query Language. It is a special-purpose programming language used for data management in relational databases.

Your WordPress blog uses such a database, too. Everything you do in your WordPress dashboard, such as changing settings, passwords, creating content, etc. is written into your blog’s SQL database. In other words, it is a vital part of your blogging experience.

And the reason why it is so easy to change that pesky sentence in hundreds of posts by just one command.

Here is the command to use:

You have to replace old_content with the exact string of characters as they are currently visible in your posts. And replace new_content with the new, corrected string of characters.

In case you wish to change characters that are not visible to your readers, such as HTML tags or CSS formatting, you need to enter them exactly as they are used in your posts. Make sure that you are going to change only what you intend to change and nothing else.

To use the command, you need to enter your SQL database. The database is located at your hosting server. Your hosting provider gave you the access information to your SQL database in the beginning of your cooperation. It is usually a web link, a user name, and a password.

Once you enter the database interface (in the image below it is phpMyAdmin), the process is pretty straightforward.


Enter SQL command

  1. Select the correct database that you wish to manage in the left pane.
  2. Click on the SQL button in the right pane.
  3. Enter your command in the correct format using the correct character strings.
  4. Click Go.

Depending on the occurrence of the string in the database, the process of replacing it will take a shorter or longer moment.

Liked this post?

Subscribe to our newsletter to receive early notification of new posts and deals:
[mc4wp_form id=”45″]

Next Post »« Previous Post