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:
SET post_content = REPLACE (post_content, 'old_content', 'new_content');
You have to replace
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.
- Select the correct database that you wish to manage in the left pane.
- Click on the SQL button in the right pane.
- Enter your command in the correct format using the correct character strings.
- 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: