Skip to content

Instantly share code, notes, and snippets.

@lepe
lepe / searchreplacedb2.php
Created October 10, 2018 14:12 — forked from Fabax/searchreplacedb2.php
Wordpress : replace
<?php
/**
*
* Safe Search and Replace on Database with Serialized Data v2.0.1
*
* This script is to solve the problem of doing database search and replace when
* developers have only gone and used the non-relational concept of serializing
* PHP arrays into single database columns. It will search for all matching
* data on the database and change it, even if it's within a serialized PHP
* array.