Media Replacer times out on large site
-
Replacing the links on every page is a very process intensive feature.
With the latest update, now your script is ALWAYS searching through every single post in our database, even when we do not choose to rename the file. This causes the latest version to *always* fail for our users, so we do not use it, and I created CSS hacks to hide this feature.
It would be helpful if we could disable this non-working feature (rename / replace links), until it is fixed for large sites. Possible?
At this point, I needed to fix it using the hacks seen in the screenshots here, and lock the updates until I hear from you:
Disable replacer: https://drive.google.com/file/d/1ptbh4omKrAPY0cmD7cz9EsIdeflB5jqq/view?usp=sharing
CSS cover ups: https://drive.google.com/file/d/1pzjO7f3H-lCHczPkz8N03onL0LW_5fvo/view?usp=sharing
- When not using the search-replace function, there does not appear to be any reason your code (Replacer.php – line 200) should be doing a search-replace on the entire posts table, when it has nothing to change – can you please fix?
- We would love to also use the link search-replacer feature, and be able to rename the file being replaced. As mentioned, it fails and times out every time, when trying to search through 20k+ pages which are very link-heavy. Have you considered using a cron process and background processing for the
doReplaceQuery
function? This could be the solution for you, here are some examples of ays for you to improve the script so it doesn’t time out on large sites:
https://github.com/deliciousbrains/wp-background-processing
https://deliciousbrains.com/background-processing-wordpress/
OR
https://florianbrinkmann.com/en/background-processes-wordpress-4579/
Looking forward to hearing from you. #1 above is a blocker for us to update the plugin, so your urgent review would be most helpful, please and thanks!
Happy to answer any questions or provide more details – Hope this helps!
Cheers!
Terrance - When not using the search-replace function, there does not appear to be any reason your code (Replacer.php – line 200) should be doing a search-replace on the entire posts table, when it has nothing to change – can you please fix?
- The topic ‘Media Replacer times out on large site’ is closed to new replies.