Chapter in this post:
As some readers already know, I implement a relatively large number of customer domains with the WordPress CMS system. And whenever a table is to be built into a post, there is only one plug-in that is the best choice for this task: TablePress by Tobias Bäthge. At this point, a big thank you for making the plugin available to everyone for free. The plugin is not only very easy to use and has an appealing look in the admin and in the output of the tables, but Tobias also offers excellent support. Usually you have an answer to your question within a few hours.
And here we come to the next ingenious plugin: "Search and replace" from Inspyside GmbH. While other English-language plugins (such as "Better Search and Replace") have failures more often when it comes to large databases, this plugin works diligently through all the tables that belong to WordPress and replaces one string with another. The plugin even has an extra feature to change the WordPress domain if you move from one domain to another, but this feature doesn't solve the problem I had when changing URLs in TablePress.
In the current case, I had a customer who had created a number of tables in TablePress, in which, in turn, very often images and links with URLs were incorporated. Unfortunately the "Find and Replace" plugin did not find some URLs, but they were definitely in the tables. After consulting the TablePress programmer, the problem was localized: The URLs are saved in JSON format and thus commented out with backslashes. This means that instead of "https://www.sir-apfelot.de", "https: \ / \ / www.sir-apfelot.de" is saved in the database.
This change makes it understandable why the plugin cannot find the URL in some cases. So that the plugin is also successful in TablePress, you have to search for and replace this spelling.
After that, however, I still had some URLs that were still not found. To see where the problem was, I looked directly in the database and found an additional notation there: double commenting out of the slashes. So instead of "https://www.sir-apfelot.de" there was "http: \\ / \\ / www.sir-apfelot.de".
In order to find all URLs or domains, you have to do a total of three runs with the plugin and search for and replace these three spellings:
The plugin still offers a small obstacle: If you want to replace the URL of the blog by running the plugin, it recognizes this and does not carry out the process in the current database but only offers a copy of the database with the desired changes as a download .
The additional security is ok, but I know what I'm doing and don't like this constraint. To switch off the security query, you can make a small change in the source code of the plugin:
In the file /inc/Page/SearchReplace.php you will find the following entry in line 245:
$ contains_site_url = strpos ($ search, $ this-> get_stripped_site_url ());
This is replaced by:
$ contains_site_url = strpos ($ search, "123". $ this-> get_stripped_site_url ());
Jens has been running the blog since 2012. He appears as Sir Apfelot for his readers and helps them with problems of a technical nature. In his free time he drives electric unicycles, takes photos (preferably with his iPhone, of course), climbs around in the Hessian mountains or hikes with the family. His articles deal with Apple products, news from the world of drones or solutions for current bugs.