deliciousbrains / better-search-replace Goto Github PK
View Code? Open in Web Editor NEWA simple plugin for updating URLs or other text in a database.
Home Page: https://bettersearchreplace.com
License: GNU General Public License v3.0
A simple plugin for updating URLs or other text in a database.
Home Page: https://bettersearchreplace.com
License: GNU General Public License v3.0
When we pass this data to WordPress' Post Meta system:
[ 'item' => '\\' ]
We get this:
a:1:{s:4:"item";s:1:"\";}
Serialized data should be treated as-is; it's why we use serialization over JSON in the first place.
Method mysql_escape_mimic()
double-escapes these strings.
When passing the serialized metadata, we get this:
a:1:{s:4:\"item\";s:1:\"\\\";}
With that, the string is now broken, and unserializing it would return (bool) false
.
There's a plugin that'll allegedly do this for $49 (https://shopplugins.com/plugins/edd-enhanced-ecommerce-tracking/)
or we could simply add some event tracking (in-line) to the purchase button upon successful form submission
If the results transient is deleted or expired for any reason there is no warning - just a blank thick box.
I think there is a issue in the new version. When I select more tables with shift and click and execute it, the result show 1 table searched and not the quantity of selected tables.
Please check this.
Hi,
on this website https://concertplatform.com/zoek-concerten/ my images are broken.
when I take a look in the database, I see many links did not change.
for instance
INSERT INTO wp_posts
VALUES("626", "1", "2018-05-30 07:59:21", "2018-05-30 05:59:21", "", "kloosterkerkconcerten-1.jpg", "", "inherit", "open", "closed", "", "kloosterkerkconcerten-1-jpg", "", "", "2018-05-30 07:59:21", "2018-05-30 05:59:21", "", "602", "https://concertplatform.com/nieuw/wp-content/uploads/2018/05/kloosterkerkconcerten-1.jpg", "0", "attachment", "image/jpeg", "0");
I searched for nieuw/wp-content/
change in wp-content/
there was 1 cell changed
and
concertplatform.com/nieuw/wp-content/
change in concertplatform.com/wp-content/
There were 8 cells changed...
what goes wrong here?
can there be a kind of time out?
Hi Folks,
I'd love to run some search and replace commands programatically. Is there any way to do this with Better Search and Replace?
~G
Hello
I have an entry in wp_options from Divi BodyCommerce plugin ( option_name: divi-bodyshop-woo_options).
Every time I search/replace for any string (which is not present in this value), the content of this option is replaced by s:1:"1"; in the database!
the option_value original content is:
s:7605:"a:168:{s:25:"product-template-set-page";s:16:"product-template";s:16:"9ec6614ee4add8bd";s:0:"";s:21:"product_page_template";s:3:"146";s:22:"product_page_fullwidth";s:1:"1";s:38:"product_page_enable_multiple_templates";s:1:"0";s:24:"custom_product_assurance";s:0:"";s:25:"custom_product_non-classe";s:0:"";s:16:"39b24ce5e75c45ff";s:0:"";s:18:"cart_page_template";s:0:"";s:24:"cart_empty_page_template";s:0:"";s:19:"cart_page_fullwidth";s:1:"0";s:26:"category-template-set-page";s:17:"category-template";s:16:"0dcb8d67b6ae2c87";s:0:"";s:16:"71de4516fd9c6998";s:0:"";s:26:"archive_page_shop_template";s:3:"154";s:30:"archive_page_category_template";s:3:"198";s:39:"category_page_enable_multiple_templates";s:1:"0";s:25:"custom_category_assurance";s:0:"";s:26:"custom_category_non-classe";s:0:"";s:22:"custom_category_banque";s:0:"";s:21:"custom_product_banque";s:0:"";s:16:"febe7f97c7cdaa96";s:0:"";s:16:"445404ec2f175d91";s:0:"";s:31:"other_settings_ajax_add_to_cart";s:1:"1";s:43:"other_settings_ajax_add_to_cart_text_notify";s:0:"";s:48:"other_settings_ajax_add_to_cart_text_notify_time";s:4:"4000";s:41:"ajax_add_to_cart_text_notify_btn_bg_color";s:7:"#dd3333";s:43:"ajax_add_to_cart_text_notify_btn_text_color";s:7:"#dd9933";s:16:"ab930b2351635dc6";s:0:"";s:36:"other_settings_default_product_image";s:0:"";s:25:"other_settings_button_fix";s:1:"1";s:35:"other_settings_breadcrumb_separator";s:0:"";s:32:"other_settings_breadcrumb_remove";s:1:"0";s:35:"other_settings_breadcrumb_home_shop";s:1:"0";s:40:"other_settings_breadcrumb_home_shop_text";s:0:"";s:32:"other_settings_remove_sale_badge";s:1:"0";s:23:"product_free_price_name";s:0:"";s:27:"my_account_menu_text_change";s:0:"";s:31:"my_account_menu_text_change_css";s:0:"";s:16:"a4a66c3f18679f43";s:0:"";s:25:"notice_product_added_cart";s:0:"";s:29:"notice_product_added_cart_btn";s:0:"";s:16:"561465a8c567c1f2";s:0:"";s:18:"mini-cart-set-page";s:9:"mini cart";s:15:"enable_minicart";s:1:"1";s:17:"minicart_activate";s:1:"0";s:25:"minicart_remove_item_text";s:1:"0";s:14:"minicart_width";s:3:"560";s:28:"minicart_horizontal_distance";s:4:"-100";s:26:"minicart_vertical_distance";s:2:"25";s:22:"minicart_remove_option";s:1:"0";s:16:"8f49801393f0d7e7";s:0:"";s:16:"f08c5be5bfc0a5ce";s:0:"";s:13:"ajax_minicart";s:1:"1";s:18:"auto_show_minicart";s:1:"0";s:16:"atc_pupup_enable";s:1:"1";s:36:"atc_pupup_successfully_added_to_cart";s:42:"Le produit a été ajouté à votre panier";s:36:"atc_pupup_continue_shopping_btn_text";s:9:"Continuer";s:24:"auto_show_minicart_delay";s:1:"1";s:29:"auto_show_minicart_close_time";s:1:"7";s:16:"e6f75c47f61ab496";s:0:"";s:16:"4760e7dd8b5aa1ad";s:0:"";s:20:"mini_cart_background";s:0:"";s:28:"mini_cart_generic_text_color";s:0:"";s:23:"mini_cart_remove_shadow";s:1:"0";s:16:"686cdae1b278dac9";s:0:"";s:28:"mini_cart_subtotal_text_size";s:2:"20";s:29:"mini_cart_subtotal_text_color";s:0:"";s:16:"97f1c8ec0ed0b9a4";s:0:"";s:28:"mini_cart_product_image_size";s:2:"32";s:33:"mini_cart_product_title_text_size";s:2:"14";s:34:"mini_cart_product_title_text_color";s:0:"";s:42:"mini_cart_product_quantity_price_text_size";s:2:"14";s:43:"mini_cart_product_quantity_price_text_color";s:0:"";s:26:"mini_cart_remove_text_size";s:2:"14";s:27:"mini_cart_remove_text_color";s:0:"";s:16:"1a1c2ffeccd7c47a";s:0:"";s:23:"mini_cart_view_btn_text";s:14:"Voir le panier";s:27:"mini_cart_checkout_btn_text";s:8:"Checkout";s:33:"mini_cart_use_custom_style_button";s:1:"1";s:32:"mini_cart_field_button_text_size";s:2:"14";s:33:"mini_cart_field_button_text_color";s:7:"#ffffff";s:39:"mini_cart_field_button_background_color";s:0:"";s:35:"mini_cart_field_button_border_width";s:1:"0";s:35:"mini_cart_field_button_border_color";s:0:"";s:36:"mini_cart_field_button_border_radius";s:1:"3";s:37:"mini_cart_field_button_letter_spacing";s:1:"0";s:31:"mini_cart_field_add_button_icon";s:2:"no";s:27:"mini_cart_field_button_icon";s:0:"";s:33:"mini_cart_field_button_icon_color";s:0:"";s:37:"mini_cart_field_button_icon_placement";s:5:"right";s:43:"mini_cart_field_button_icon_only_show_hover";s:1:"0";s:16:"a4b6e366308b2eee";s:0:"";s:33:"mini_cart_button_hover_text_color";s:0:"";s:39:"mini_cart_button_hover_background_color";s:0:"";s:35:"mini_cart_button_hover_border_color";s:0:"";s:36:"mini_cart_button_hover_border_radius";s:1:"3";s:37:"mini_cart_button_hover_letter_spacing";s:1:"0";s:16:"3d0de26fb3916b57";s:0:"";s:23:"enable_cart_custom_icon";s:1:"1";s:30:"enable_cart_custom_icon_select";s:15:"shopping-cart-2";s:22:"cart_custom_icon_width";s:2:"25";s:22:"cart_custom_icon_color";s:0:"";s:33:"cart_custom_icon_background_color";s:0:"";s:40:"cart_custom_icon_background_padding_left";s:2:"10";s:41:"cart_custom_icon_background_padding_right";s:2:"10";s:39:"cart_custom_icon_background_padding_top";s:1:"5";s:31:"cart_custom_icon_enable_numbers";s:1:"1";s:37:"cart_custom_icon_disable_empty_number";s:1:"1";s:34:"cart_custom_icon_enable_text_after";s:0:"";s:41:"cart_custom_icon_enable_text_after_plural";s:0:"";s:34:"cart_custom_icon_icon_postion_left";s:1:"0";s:33:"cart_custom_icon_icon_postion_top";s:3:"-10";s:16:"014495fe804b8394";s:0:"";s:29:"cart_custom_icon_number_style";s:6:"circle";s:36:"cart_custom_icon_number_postion_left";s:1:"0";s:35:"cart_custom_icon_number_postion_top";s:1:"0";s:40:"cart_custom_icon_number_background_color";s:7:"#dd3333";s:46:"cart_custom_icon_number_background_color_hover";s:7:"#000000";s:48:"cart_custom_icon_number_background_border_radius";s:3:"100";s:40:"cart_custom_icon_number_background_width";s:2:"25";s:41:"cart_custom_icon_number_background_height";s:2:"25";s:34:"cart_custom_icon_number_text_color";s:7:"#ffffff";s:38:"cart_custom_icon_number_text_font_size";s:2:"14";s:16:"9e16677530d8b3fe";s:0:"";s:16:"97f6842df71600bb";s:0:"";s:20:"search_page_template";s:0:"";s:20:"divi_search_products";s:1:"0";s:23:"email-template-set-page";s:5:"email";s:21:"enable_email_template";s:1:"1";s:16:"46a7c14d0028bc68";s:0:"";s:16:"fe5b4d89ef066394";s:0:"";s:27:"BodyCommerce_email_bg_color";s:0:"";s:31:"BodyCommerce_email_accent_color";s:0:"";s:32:"BodyCommerce_email_body_bg_color";s:0:"";s:29:"BodyCommerce_email_text_color";s:0:"";s:29:"BodyCommerce_email_page_width";s:3:"600";s:32:"BodyCommerce_email_border_radius";s:1:"0";s:31:"BodyCommerce_email_h1_font_size";s:2:"25";s:31:"BodyCommerce_email_h2_font_size";s:2:"14";s:31:"BodyCommerce_email_h3_font_size";s:2:"13";s:30:"BodyCommerce_email_p_font_size";s:2:"12";s:40:"BodyCommerce_email_paragraph_line_height";s:3:"1.7";s:16:"692e11e29effdc2e";s:0:"";s:30:"BodyCommerce_email_header_logo";s:4:"2846";s:34:"BodyCommerce_email_header_bg_color";s:0:"";s:36:"BodyCommerce_email_header_text_color";s:0:"";s:35:"BodyCommerce_email_header_alignment";s:6:"center";s:37:"BodyCommerce_email_header_logo_height";s:3:"100";s:44:"BodyCommerce_email_header_logo_padding_below";s:1:"0";s:16:"02453cdbcafe9eb0";s:0:"";s:37:"BodyCommerce_email_table_border_width";s:1:"1";s:37:"BodyCommerce_email_table_border_color";s:0:"";s:33:"BodyCommerce_email_table_bg_color";s:0:"";s:25:"BodyCommerce_enable_image";s:1:"1";s:30:"BodyCommerce_enable_image_size";s:2:"32";s:25:"BodyCommerce_customer_sku";s:1:"0";s:16:"99399608e2217d2d";s:0:"";s:30:"BodyCommerce_email_footer_logo";s:0:"";s:34:"BodyCommerce_email_footer_bg_color";s:0:"";s:36:"BodyCommerce_email_footer_text_color";s:7:"#dd9933";s:35:"BodyCommerce_email_footer_alignment";s:6:"center";s:37:"BodyCommerce_email_footer_logo_height";s:3:"100";s:30:"BodyCommerce_email_footer_text";s:0:"";s:16:"349fa04380698c57";s:0:"";s:16:"b14010208a497c52";s:0:"";s:16:"322b5a0d9e295c91";s:0:"";s:16:"dc6d3d0a26ddc3f3";s:0:"";}";
I have a large multisite network with ~80 sites. This results in over 1600 tables. When I select all tables and run search/replace, it only grabs the first 998 tables. On the page reload that results from the successful running of the plugin, only those 998 tables are selected, and I have to select the remaining tables and re-run the plugin to get perform the search and replace on them.
Especially as we start to think about upgrade to MDB funnels etc, would love to get tags for BSR customers working like we have for MDB and OS3: https://github.com/deliciousbrains/site/issues/460
Clearly I must be missing something, or not understanding something. When use Better Search Replace my results show: "DRY RUN: 76 tables were searched, 746 cells were found that need to be updated, and 0 changes were made." Clicking the Run Search/Replace button multiple times changes nothing.
So the plugin found 746 instances that needed to be updated, but it failed to update anything? I checked the settings tab and didn't see any option like "enable replace", nor any link after the completed search to "perform replace", etc.
Again, I must be missing something here....
In 1.2.3, we removed stripslashes() due to them preventing users from being able to search for backslashes (a somewhat common scenario).
This uncovered a bug which occurs when WordPress uses wp_magic_quotes, characters such as "'" will add unnecessary slashes.
Seems this plugin do not work because it is doing capability check for 'install_plugins' so it won't work on read only environments of Pantheon, is it feasible to use the 'manage_options' capabilities instead? If yes, are you welcome for PR of it?
The core functions of the plugin should be unit tested.
A start would be to add X amount of posts and run assertions based on that.
An error occurred processing your request. Try decreasing the "Max Page Size", or contact support.
I have tried everything but it is not happening
Subj.
This was deprecated with a recent release of WordPress, we should use WordPress core function get_locale()
instead.
This is currently causing the language in the debug info to pull US if the constant hasn't been defined.
The latest commit works to an extent. If I add \
to escape, it executes the query properly, however the escape does not persist with the rest of the query string when the page reloads.
Additionally, running a query with /
in it, such as a full URL, causes the plugin to 404.
WP Bakery (aka Visual Composer) unfortunately stores HTML with Base64 encoding.
This prevents search/replace when moving from http to https (for one example).
Would be nice to add a Base64 flag on the Search and Replace page (perhaps with a warning to only use on wp_posts).
Decent Q&A + code here:
https://stackoverflow.com/questions/47330037/changing-urls-in-visual-composers-raw-html-block
Appears to be related to how WC loads classes based on type of request (AJAX, cron, etc).
Should go to https://bettersearchreplace.com/?utm_source=insideplugin&utm_medium=web&utm_content=help-tab&utm_campaign=pro-upsell
You should search the codebase for expandedfronts.com and see what else needs to be updated. Please ask me what the UTM tags should be if you find some more.
Hey guys, I found today that your plugin do such a number of queries to perform replace, that servers using mod_evasive may end up halting the execution, resulting in the plugin being unable to complete the operation.
To override this issue, you should add to the Settings page an option to add a delay between each request. Values should vary between 0 seconds (default behviour, no delay), and 10 seconds of delay. That will suffice to workaround the issue.
Hope you can add this. Best regards
When searching for something with the "&" symbol in the title, the replace glitches and only replaces with text before the &.
I've used the plugin to make text changes on a large custom theme where it's difficult to track down where text in certain areas is being pulled from. Since I am only accessing the site from the dashboard and don't have direct access to the database it'd be helpful if the search results showed details on the posts that were changed beyond just 1 cell from the post table. Having at least the name of the post would be great.
Hello,
It would be very helpful to preview the before/after replacement.
Hello,
We sometimes use Ajax Load More https://connekthq.com/plugins/ajax-load-more/
When we find/replace the domain and have filters active in Ajax Load more https://connekthq.com/plugins/ajax-load-more/add-ons/filters/
The filters are gone. Filters are stored in the option table as serialized json’
Is there someway why this happens and how to prevent this?
I want to replace http%3A%2F%2Fmydoimain.users63.mydns.co.uk%2F with http%3A%2F%2Flivewebsite.co.uk%2F
This used to work, but now better Search Rpelace seems to convert those special ASCII % characters back to normal character sfor me.
That's no use as I want to replace character strings creted by WP Bakery, which use ASCII % characters
I just used BSR to change all instances of Verse
to Step
then ran it again to change all instances of verse
to step
.
Then I noticed something strange.
What should have been Verse blocks were now appearing as Classic, with preformatted blocks within them.
I'd accidentally changed wp:verse
to wp:step
.
All instances of the word Verse
to be changed to Step
in post content.
All instances of the word verse
to be changed to step
in post content.
The block type names were changed as well.
It would be nice if there was an option to NOT change block type names.
Or at least a warning.
Is this part of the Pro version?
Run BRS again changing wp:step
to wp:verse
.
PS
The irony is that I'd run BRS against my Problem Solving website.
So, I can now use this Issue as a problem solving example.
https://bobbingwide.com/problem-solving/oik_presentation/steps/step-13-whats-changed/
PPS
I also created a problem with permalinks; by changing verse
to Step
.
Make sure that wp_enqueue_style and wp_enqueue_script are only loaded via hook for the Better Search Replace management page.
This is the first time I've used the new Blocks capability on a build. I'm creating my blocks via ACF Pro. Within some of the blocks I've created, I have simple WYSIWYG text fields, and within those, obviously you can create links or add images etc.
When that data is saved to the database, it gets saved in a JSON object and HTML within the text field has parts that get escaped. Seems primarily to be the slashes, probably other things as well. So for example:
<!-- wp:acf/introduction { "id": "block_5e8cb5c59c4b3", "name": "acf\/introduction", "data": { "text": "<a href=\"http:\/\/testwebsite.test\/part-one\/part-two\/\">Learn More<\/a>", "_text": "field_5e6900ce032f4", } } /-->
So now I go to do a find replace on http://testwebsite.test and it doesn't find it because it's been escaped. Seems that Better Search & Replace needs to be tweaked such that escaped slashes (and whatever else is relevant) are sorted out and you can find things within these Block content fields.
To make it easier to use (esp. with dry run), prefill the selected tables and GUID option after running a dry run, so all the user has to do is click "Run Search/Replace" to finalize if all looks good in the dry run.
Feature request:
Would be awesome if you could search and replace in bulk. For instance, search for A, B and replace by A1, B1
If in the search field I input something like %2Fanystring%2F, it will search for /anystring/, literally, and some plugins like Visual Composer use to encode URLs in the content to improve security. Having said that, your plugin will never find %2Fanystring%2F because it really searches for /anystring/.
So, is there any workaround to this? Can I use some regex?
Please advice
Hi,
I have Wordpress 5.3.2 with Better Search Replace 1.3.3 and also this plugin installed:
GDPR Cookie Compliance 4.1.2
https://wordpress.org/plugins/gdpr-cookie-compliance/
It manages a table called wp_gdpr_cc_options
, which roughly contains the following values:
INSERT INTO `wp_gdpr_cc_options` (`id`, `option_key`, `option_value`, `site_id`, `extras`) VALUES
(1, 'moove_gdpr_nonce', 's:10:\"9340dc9d83\";', 1, NULL),
(2, '_wp_http_referer', 's:57:\"/wp-admin/?page=moove-gdpr&tab=strictly-necessary-cookies\";', 1, NULL),
(3, 'moove_gdpr_brand_colour', 's:7:\"#0c4da2\";', 1, NULL),
(4, 'moove_gdpr_brand_secondary_colour', 's:7:\"#e5e0e0\";', 1, NULL),
(5, 'moove_gdpr_company_logo', 's:90:\"http://localhost:18001/wp-content/plugins/gdpr-cookie-compliance/dist/images/gdpr-logo.png\";', 1, NULL),
(6, 'moove_gdpr_logo_position', 's:4:\"left\";', 1, NULL),
(7, 'moove_gdpr_button_style', 's:7:\"rounded\";', 1, NULL),
(8, 'moove_gdpr_plugin_font_type', 's:1:\"1\";', 1, NULL),
(9, 'moove_gdpr_plugin_font_family', 's:20:\"\'Nunito\', sans-serif\";', 1, NULL),
(10, 'moove_gdpr_cdn_url', 's:0:\"\";', 1, NULL),
(11, 'moove_gdpr_infobar_visibility', 's:7:\"visible\";', 1, NULL),
(12, 'moove_gdpr_reject_button_enable', 's:1:\"0\";', 1, NULL),
(13, 'moove_gdpr_colour_scheme', 's:1:\"2\";', 1, NULL),
(14, 'moove_gdpr_info_bar_content', 's:259:\"<p>A weboldalon a minőségi felhasználói élmény érdekében sütiket használunk.</p>\n<p>Ismerje meg tájékoztatónkat arról, hogy milyen sütiket használunk, vagy a [setting]beállítások[/setting] résznél ki lehet kapcsolni a használatukat.</p>\n\";', 1, NULL),
(15, 'moove_gdpr_infobar_accept_button_label', 's:7:\"Elfogad\";', 1, NULL),
(16, 'moove_gdpr_infobar_reject_button_label', 's:6:\"Reject\";', 1, NULL),
(17, 'moove_gdpr_infobar_position', 's:6:\"bottom\";', 1, NULL),
(18, 'moove_gdpr_strictly_necessary_cookies_functionality', 'i:1;', 1, NULL),
(19, 'moove_gdpr_strictly_necessary_cookies_tab_title', 's:32:\"Feltétlenül szükséges sütik\";', 1, NULL),
(20, 'moove_gdpr_strict_necessary_cookies_tab_content', 's:137:\"A feltétlenül szükséges sütiket mindenkor engedélyezni kell, hogy elmenthessük a beállításokat a sütik további kezeléséhez.\";', 1, NULL),
(21, 'moove_gdpr_strictly_necessary_cookies_warning', 's:246:\"Amennyiben ez a süti nem kerül engedélyezésre, akkor nem tudjuk elmenteni a kiválasztott beállításokat, ami azt eredményezi, hogy minden egyes látogatás alkalmával ismételten el kell végezni a sütik engedélyezésének műveletét.\";', 1, NULL),
(22, 'moove_gdpr_modal_strictly_secondary_notice', 's:145:\"<p>A feltétlenül szükséges sütiket mindenkor engedélyezni kell, hogy elmenthessük a beállításokat a sütik további kezeléséhez.</p>\n\";', 1, NULL);
When I run Better Search Replace on my database including the wp_gdpr_cc_options
table (I replace http://localhost:18001 with https://somedomain.com) this is what I get in the database:
INSERT INTO `wp_gdpr_cc_options` (`id`, `option_key`, `option_value`, `site_id`, `extras`) VALUES
(1, 'moove_gdpr_nonce', 's:1:\"1\";', 1, NULL),
(2, '_wp_http_referer', 's:1:\"1\";', 1, NULL),
(3, 'moove_gdpr_brand_colour', 's:1:\"1\";', 1, NULL),
(4, 'moove_gdpr_brand_secondary_colour', 's:1:\"1\";', 1, NULL),
(5, 'moove_gdpr_company_logo', 's:1:\"1\";', 1, NULL),
(6, 'moove_gdpr_logo_position', 's:1:\"1\";', 1, NULL),
(7, 'moove_gdpr_button_style', 's:1:\"1\";', 1, NULL),
(8, 'moove_gdpr_plugin_font_type', 's:1:\"1\";', 1, NULL),
(9, 'moove_gdpr_plugin_font_family', 's:1:\"1\";', 1, NULL),
(10, 'moove_gdpr_cdn_url', 's:1:\"1\";', 1, NULL),
(11, 'moove_gdpr_infobar_visibility', 's:1:\"1\";', 1, NULL),
(12, 'moove_gdpr_reject_button_enable', 's:1:\"1\";', 1, NULL),
(13, 'moove_gdpr_colour_scheme', 's:1:\"1\";', 1, NULL),
(14, 'moove_gdpr_info_bar_content', 's:1:\"1\";', 1, NULL),
(15, 'moove_gdpr_infobar_accept_button_label', 's:1:\"1\";', 1, NULL),
(16, 'moove_gdpr_infobar_reject_button_label', 's:1:\"1\";', 1, NULL),
(17, 'moove_gdpr_infobar_position', 's:1:\"1\";', 1, NULL),
(18, 'moove_gdpr_strictly_necessary_cookies_functionality', 'i:1;', 1, NULL),
(19, 'moove_gdpr_strictly_necessary_cookies_tab_title', 's:1:\"1\";', 1, NULL),
(20, 'moove_gdpr_strict_necessary_cookies_tab_content', 's:1:\"1\";', 1, NULL),
(21, 'moove_gdpr_strictly_necessary_cookies_warning', 's:1:\"1\";', 1, NULL),
(22, 'moove_gdpr_modal_strictly_secondary_notice', 's:1:\"1\";', 1, NULL);
Somehow all values become 's:1:\"1\";'
, so practically all GDPR Cookie Compliance settings get lost.
It happens regardless whether I do the replace on the whole database or just on the wp_gdpr_cc_options
table.
Hello, I used the Better Search Replace plugin to replace some words in my blog's articles and everything went fine, all words found in wp_options, wp_postmeta and wp_posts tables were replaced. However, when I logged out from Wordpress, all changes disappeared and the old words come out again. Tried to refresh the page, tried from another browser and another computer but same result. I did NOT use the dry mode, therefore changes were effective and, when being logged in, I could see them in every page loaded. Am using the latest Wordpress and plugin versions. Can you pls help ??
I have been using this plugin en numerous sites. Now I also use Elementor on most sites, and unfortunately, it seems that search and replaces does not work well.
It does find strings, it tells me it replaces them… but nothing changes on the front end.
Any hint?
I've copied the HTML below from WP Migrate DB Pro and adjusted the campaigns[]
and source
hidden inputs. Feel free to tweak the rest as needed.
<form method="post" action="https://deliciousbrains.com/email-subscribe/" target="_blank" class="subscribe block">
<h2><?php _e( 'Get 20% Off!', 'wp-migrate-db' ); ?></h2>
<?php $user = wp_get_current_user(); ?>
<p class="interesting">
<?php echo wptexturize( __( "Submit your name and email and we'll send you a coupon for 20% off your upgrade to the pro version.", 'wp-migrate-db' ) ); ?>
</p>
<div class="field">
<input type="email" name="email" value="<?php echo esc_attr( $user->user_email ); ?>" placeholder="<?php _e( 'Your Email', 'wp-migrate-db' ); ?>"/>
</div>
<div class="field">
<input type="text" name="first_name" value="<?php echo esc_attr( trim( $user->first_name ) ); ?>" placeholder="<?php _e( 'First Name', 'wp-migrate-db' ); ?>"/>
</div>
<div class="field">
<input type="text" name="last_name" value="<?php echo esc_attr( trim( $user->last_name ) ); ?>" placeholder="<?php _e( 'Last Name', 'wp-migrate-db' ); ?>"/>
</div>
<input type="hidden" name="campaigns[]" value="9" />
<input type="hidden" name="source" value="10" />
<div class="field submit-button">
<input type="submit" class="button" value="<?php _e( 'Send me the coupon', 'wp-migrate-db' ); ?>"/>
</div>
<p class="promise">
<?php _e( 'We promise we will not use your email for anything else and you can unsubscribe with 1-click anytime.', 'wp-migrate-db' ); ?>
</p>
</form>
My disk is filling up an under one minute upon executing a search.
The error message below repeats in the log until the disk is full. (about 15 GB)
PHP message: PHP Notice: BSR_DB::recursive_unserialize_replace(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "DUP_Archive_Filter_Scope_Base" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /home/runcloud/webapps/CBM/wp-content/plugins/better-search-replace/includes/class-bsr-db.php on line 344PHP message: PHP Notice: BSR_DB::recursive_unserialize_replace(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "DUP_Archive_Filter_Info" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /home/runcloud/webapps/CBM/wp-content/plugins/better-search-replace/includes/class-bsr-db.php on line 344PHP message: PHP Notice: BSR_DB::recursive_unserialize_replace(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "DUP_Archive_Filter_Info" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /home/runcloud/webapps/CBM/wp-content/plugins/better-search-replace/includes/class-bsr-db.php on line 344PHP message: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/runcloud/webapps/CBM/wp-content/plugins/better-search-replace/includes/class-bsr-db.php on line 344', referer: http://coffee-brewing-methods.com/wp-admin/tools.php?page=better-search-replace&tab=bsr_search_replace&result=true
search for https://coffee-brewing-methods.com
replace with: http://coffee-brewing-methods.com
Thanks,
Dorian
Hi,
I've activated Better Search Replace Pro plugin but cannot see settings in the admin.
My site is multisite, already tried to switch to Default theme and deactivate another plugins.
Please help to advice.
Thanks,
Sandy
This is because if there is wp_2, SHOW TABLES LIKE 'wp_2'
would also return tables prefixed wp_21, etc.
Add/improve batch processing functionality. There is currently code to split it up into chunks but this is ran through a for loop.
Look into switching to AJAX-based batch processing where each block is ran in background via a separate request, and determine if performance impact outweighs benefits.
See https://wordpress.org/plugins/better-search-replace/
Potential fix in version 3 of Search/Replace DB script
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.