{"id":8598,"date":"2026-05-28T10:12:07","date_gmt":"2026-05-28T08:12:07","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=8598"},"modified":"2026-06-09T04:04:51","modified_gmt":"2026-06-09T02:04:51","slug":"better-search-replace-how-to-safely-modify-your-wordpress-database","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/","title":{"rendered":"Better Search Replace: How to Safely Modify Your WordPress Database"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">Making changes directly to a WordPress database can be risky, especially when updating URLs, replacing text across multiple pages, or migrating a website to a new domain. The Better Search Replace plugin provides a safer way to perform these changes while preserving WordPress data structures and serialized data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article explains when Better Search Replace is useful, how it works, and the precautions you should take before modifying your database.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#What_Is_Better_Search_Replace\" >What Is Better Search Replace?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#When_Should_You_Use_It\" >When Should You Use It?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Before_Making_Any_Changes\" >Before Making Any Changes<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Create_a_Database_Backup\" >Create a Database Backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Verify_the_Replacement_Value\" >Verify the Replacement Value<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Using_the_Dry_Run_Feature\" >Using the Dry Run Feature<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Selecting_Database_Tables\" >Selecting Database Tables<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Common_Use_Cases\" >Common Use Cases<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Domain_Changes\" >Domain Changes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#HTTPS_Migrations\" >HTTPS Migrations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Bulk_Content_Updates\" >Bulk Content Updates<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Practical_Considerations\" >Practical Considerations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/better-search-replace-how-to-safely-modify-your-wordpress-database\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Is_Better_Search_Replace\"><\/span>What Is Better Search Replace?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<\/div>\n\n<div id=\"mybox-561867553\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">Better Search Replace is a WordPress plugin that allows administrators to search for specific text within the database and replace it with new values. It is commonly used when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Migrating a website to a new domain<\/li>\n\n\n\n<li>Updating URLs after enabling HTTPS<\/li>\n\n\n\n<li>Replacing outdated company information<\/li>\n\n\n\n<li>Correcting large amounts of content across multiple pages<\/li>\n\n\n\n<li>Updating references stored in database tables<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The plugin works directly with WordPress database tables and supports serialized data, which helps prevent data corruption during large-scale replacements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When_Should_You_Use_It\"><\/span>When Should You Use It?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most common use cases is changing a website address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Search For<\/th><th>Replace With<\/th><\/tr><\/thead><tbody><tr><td><a href=\"http:\/\/old-domain.com\/\" target=\"_blank\" rel=\"noopener\">http:\/\/old-domain.com<\/a><\/td><td><a href=\"https:\/\/new-domain.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/new-domain.com<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of manually editing database records, Better Search Replace can update all matching entries in a single operation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The plugin can also be used to replace:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Brand names<\/li>\n\n\n\n<li>Contact information<\/li>\n\n\n\n<li>Internal links<\/li>\n\n\n\n<li>Tracking codes<\/li>\n\n\n\n<li>Repeated text strings<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Before_Making_Any_Changes\"><\/span>Before Making Any Changes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Create_a_Database_Backup\"><\/span>Create a Database Backup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before running any search-and-replace operation, create a complete database backup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Incorrect replacement values can affect website functionality, break links, or modify content unintentionally. A backup provides a recovery point if unexpected changes occur.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Verify_the_Replacement_Value\"><\/span>Verify the Replacement Value<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Carefully review both the text being searched and the replacement value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A small typo can affect hundreds or thousands of database records.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Using_the_Dry_Run_Feature\"><\/span>Using the Dry Run Feature<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most useful features of Better Search Replace is the <strong>Dry Run<\/strong> option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A dry run simulates the operation without making any actual changes to the database. This allows you to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify that the correct records will be modified<\/li>\n\n\n\n<li>Estimate the number of affected entries<\/li>\n\n\n\n<li>Detect potential mistakes before applying changes<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Running a dry run first is considered a best practice whenever database modifications are performed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Selecting_Database_Tables\"><\/span>Selecting Database Tables<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The plugin allows you to choose which database tables will be included in the operation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the task, you may:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select all tables<\/li>\n\n\n\n<li>Modify only content-related tables<\/li>\n\n\n\n<li>Limit changes to specific plugin data<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Selecting only the necessary tables can reduce the risk of unintended modifications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common_Use_Cases\"><\/span>Common Use Cases<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Domain_Changes\"><\/span>Domain Changes<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When moving a WordPress website to a new domain, many references to the old domain remain stored in the database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Better Search Replace can update these references efficiently.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"HTTPS_Migrations\"><\/span>HTTPS Migrations<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After installing an SSL certificate, websites often need to replace HTTP URLs with HTTPS URLs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This helps eliminate mixed-content issues and ensures resources load securely.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Bulk_Content_Updates\"><\/span>Bulk Content Updates<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The plugin can also be used to update repeated text throughout a website without editing individual pages or posts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Examples include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Company names<\/li>\n\n\n\n<li>Phone numbers<\/li>\n\n\n\n<li>Email addresses<\/li>\n\n\n\n<li>Product references<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Practical_Considerations\"><\/span>Practical Considerations<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Search-and-replace operations affect stored data directly. While Better Search Replace simplifies the process, changes should be planned carefully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before running a live replacement:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a backup.<\/li>\n\n\n\n<li>Verify the search and replacement values.<\/li>\n\n\n\n<li>Run a dry run.<\/li>\n\n\n\n<li>Review the expected results.<\/li>\n\n\n\n<li>Execute the replacement only after confirming the output.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Taking these precautions helps reduce the risk of accidental database modifications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Better Search Replace is a WordPress plugin that allows administrators to safely update data across a WordPress database. It is commonly used for domain migrations, HTTPS transitions, and large-scale content updates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before making any changes, create a database backup and use the Dry Run feature to verify the results. Careful preparation can help ensure database modifications are completed safely and accurately.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[9,58],"manual_kb_tag":[1544,5001,7094,7095,7096,7097,7098,7099,389,419],"class_list":["post-8598","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-databases","manualknowledgebasecat-web-applications-cms","manual_kb_tag-mixed-content","manual_kb_tag-domain-migration","manual_kb_tag-better-search-replace","manual_kb_tag-serialized-data","manual_kb_tag-search-and-replace","manual_kb_tag-dry-run","manual_kb_tag-bulk-content-updates","manual_kb_tag-url-replacement","manual_kb_tag-database-backup","manual_kb_tag-wordpress-plugin"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/8598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":2,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/8598\/revisions"}],"predecessor-version":[{"id":8599,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/8598\/revisions\/8599"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=8598"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=8598"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=8598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}