{"id":942,"date":"2007-12-31T16:43:09","date_gmt":"2007-12-31T08:43:09","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/"},"modified":"2025-04-04T00:40:21","modified_gmt":"2025-04-03T16:40:21","slug":"how-to-search-and-replace-wordpress-in-blog-post","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/","title":{"rendered":"How to Perform Mass Search and Replace in WordPress"},"content":{"rendered":"<p>Sometimes, you may find yourself needing to do a <strong>mass find and replace<\/strong> to fix issues. Here are a few scenarios where this might be necessary:<\/p>\n<ul>\n<li><strong>Weird characters in blog entries after upgrade<\/strong>. After upgrading WordPress, you might see characters like \u201c\u00c2, \u201c\u00c2 \u20ac \u2122\u201d, \u201c??\u201d in your posts.<\/li>\n<li><strong>Rename keyword1 to keyword2<\/strong>. If you need to rename <em>keyword1<\/em> to <em>keyword2<\/em> across your entire database, editing a large database file manually isn\u2019t practical. Downloading and uploading large files can be time-consuming and inefficient.<\/li>\n<li><strong>Discovered a typo<\/strong>. If you\u2019ve been using a phrase and realize it\u2019s misspelled, you\u2019ll want to search and replace this typo across all your blog content.<\/li>\n<li>and other similar situations\u2026<\/li>\n<\/ul>\n<p>Here are some methods to perform mass find and replace in WordPress blog entries. Always <strong>back up your database<\/strong> to avoid any data loss.<\/p>\n<h2>Search and Replace with WordPress Plugin<\/h2>\n<figure><img decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wp-findreplace.jpg\" alt=\"WordPress find and replace plugin interface\"><\/figure>\n<p>This plugin provides an interface in WP-Admin to search and replace text across all blog posts. Download and install the plugin to get started.<\/p>\n<p><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/search-and-replace\/\">Download <strong>Search and Replace<\/strong> plugin<\/a>.<\/p>\n<h2>MySQL Search and Replace via PhpMyAdmin<\/h2>\n<p>This method requires access to PhpMyAdmin. If you\u2019re not familiar with PhpMyAdmin, DO NOT USE THIS METHOD. Always <strong>backup your database<\/strong> before proceeding.<\/p>\n<ol>\n<li>Open your database in PhpMyAdmin.<\/li>\n<li>To change the contents, we\u2019ll use the \u201c<em><strong>wp_posts<\/strong><\/em>\u201d table and the \u201c<em><strong>post_content<\/strong><\/em>\u201d field as an example. Click on the <strong>SQL tab<\/strong>. \n<figure><img decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/sqltab.jpg\" alt=\"SQL tab in PhpMyAdmin\"><\/figure>\n<\/li>\n<li>Paste the following code into the textarea:\n<pre>\r\n UPDATE wp_posts SET post_content = REPLACE (\r\n post_content,\r\n 'Item to replace here',\r\n 'Replacement text here');\r\n <\/pre>\n<p>Ensure all text is within the <em>quotes<\/em> <strong>\u201d<\/strong>. Double-check everything before hitting the <strong>GO<\/strong> button.<\/p>\n<\/li>\n<\/ol>\n<p>When you hit the <strong>GO<\/strong> button, it will search the <em><strong>post_content<\/strong><\/em> field in the <em><strong>wp_posts<\/strong><\/em> table for \u2018<em>Item to replace here<\/em>\u2018 and replace it with \u2018<em>Replacement text here<\/em>\u2018.<\/p>","protected":false},"excerpt":{"rendered":"<p>Sometimes, you may find yourself needing to do a mass find and replace to fix issues. Here are a few scenarios where this might be necessary: Weird characters in blog entries after upgrade. After upgrading WordPress, you might see characters like \u201c\u00c2, \u201c\u00c2 \u20ac \u2122\u201d, \u201c??\u201d in your posts. Rename keyword1 to keyword2. If you&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49],"tags":[4663,254,255,3323,252],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Perform Mass Search and Replace in WordPress - Hongkiat<\/title>\n<meta name=\"description\" content=\"Sometimes, you may find yourself needing to do a mass find and replace to fix issues. Here are a few scenarios where this might be necessary: Weird\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Perform Mass Search and Replace in WordPress\" \/>\n<meta property=\"og:description\" content=\"Sometimes, you may find yourself needing to do a mass find and replace to fix issues. Here are a few scenarios where this might be necessary: Weird\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2007-12-31T08:43:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T16:40:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/wp-findreplace.jpg\" \/>\n<meta name=\"author\" content=\"Hongkiat Lim\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hongkiat Lim\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/\"},\"author\":{\"name\":\"Hongkiat Lim\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e3613a3bf757e4f67770f0b7a339edd0\"},\"headline\":\"How to Perform Mass Search and Replace in WordPress\",\"datePublished\":\"2007-12-31T08:43:09+00:00\",\"dateModified\":\"2025-04-03T16:40:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/\"},\"wordCount\":287,\"commentCount\":14,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wp-findreplace.jpg\",\"keywords\":[\"ad-divi\",\"MySQL\",\"plugins\",\"WordPress Plugins\",\"WordPress Tips\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/\",\"name\":\"How to Perform Mass Search and Replace in WordPress - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wp-findreplace.jpg\",\"datePublished\":\"2007-12-31T08:43:09+00:00\",\"dateModified\":\"2025-04-03T16:40:21+00:00\",\"description\":\"Sometimes, you may find yourself needing to do a mass find and replace to fix issues. Here are a few scenarios where this might be necessary: Weird\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wp-findreplace.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wp-findreplace.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-search-and-replace-wordpress-in-blog-post\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Perform Mass Search and Replace in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e3613a3bf757e4f67770f0b7a339edd0\",\"name\":\"Hongkiat Lim\",\"description\":\"Founder and Editor in Chief of Hongkiat.com. Hongkiat is also a designer, developer, entrepreneur, and an active investor in the US stock market.\",\"sameAs\":[\"http:\\\/\\\/www.hongkiat.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/hongkiat\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Perform Mass Search and Replace in WordPress - Hongkiat","description":"Sometimes, you may find yourself needing to do a mass find and replace to fix issues. Here are a few scenarios where this might be necessary: Weird","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/","og_locale":"en_US","og_type":"article","og_title":"How to Perform Mass Search and Replace in WordPress","og_description":"Sometimes, you may find yourself needing to do a mass find and replace to fix issues. Here are a few scenarios where this might be necessary: Weird","og_url":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2007-12-31T08:43:09+00:00","article_modified_time":"2025-04-03T16:40:21+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/wp-findreplace.jpg","type":"","width":"","height":""}],"author":"Hongkiat Lim","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Hongkiat Lim","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/"},"author":{"name":"Hongkiat Lim","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e3613a3bf757e4f67770f0b7a339edd0"},"headline":"How to Perform Mass Search and Replace in WordPress","datePublished":"2007-12-31T08:43:09+00:00","dateModified":"2025-04-03T16:40:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/"},"wordCount":287,"commentCount":14,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wp-findreplace.jpg","keywords":["ad-divi","MySQL","plugins","WordPress Plugins","WordPress Tips"],"articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/","url":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/","name":"How to Perform Mass Search and Replace in WordPress - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wp-findreplace.jpg","datePublished":"2007-12-31T08:43:09+00:00","dateModified":"2025-04-03T16:40:21+00:00","description":"Sometimes, you may find yourself needing to do a mass find and replace to fix issues. Here are a few scenarios where this might be necessary: Weird","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/wp-findreplace.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/wp-findreplace.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/how-to-search-and-replace-wordpress-in-blog-post\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Perform Mass Search and Replace in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e3613a3bf757e4f67770f0b7a339edd0","name":"Hongkiat Lim","description":"Founder and Editor in Chief of Hongkiat.com. Hongkiat is also a designer, developer, entrepreneur, and an active investor in the US stock market.","sameAs":["http:\/\/www.hongkiat.com\/blog"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/hongkiat\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-fc","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=942"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/942\/revisions"}],"predecessor-version":[{"id":73492,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/942\/revisions\/73492"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=942"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}