Hi Friends, Today i will tell you how to find and replace text in table using mysql query. Most of the time we need to change the text in mysql table, at that moment we can use the query to do the changes in a few seconds. When we change our website domain name and other things, at that moment we need to replace the text without doing the manual work.
You can read more about wordpress:
Free WordPress Theme Problems for Your Website
How to Restore WordPress Website from Backup Manually
How To Add New Default Gravatar Logo In WordPress
Cpanel par wordpress kaise install kare
WordPress Me New Widget Custom Area Kaise add Karte Hai
WordPress Par Theme Kaise Change Karte Hai
WordPress par blank theme kaise bnaye
You have to follow some steps to change or replace the text in phpmyadmin table. These steps are
Step1: Open your Phpmyadmin locally or using cpanel (if your website hosted somewhere open cpanel otherwise open locally).
Step2: Click on SQL in the top menu panel of PHPMYADMIN.
Step3: Paste the below code to replace the text.
For example: change the domain inside the wordpress post content.
update wp_posts set post_content = replace(post_content,'www.mydomain.com/bta','www.mydomain.com'); |
update wp_posts set post_content = replace(post_content,'www.mydomain.com/bta','www.mydomain.com');
Syntax of Mysql Query:
update table_name set field_name = replace(field_name,'Text to find','text to replace with');
Step4: After pasting the query click on GO button to run the query.
Step5: Now your text has replaced.
Read About Other Interesting Things below.
If You like my blog, kindly Subscribe it.
Categories: WordPress
Leave a Reply