UpdraftPlus Home › Forums › Paid support forum – UpdraftPlus backup plugin › migrator – memory and search and replace issues
- This topic has 4 replies, 3 voices, and was last updated 4 years ago by Steve Banks.
-
AuthorPosts
-
February 26, 2020 at 1:45 pm #519322Steve BanksParticipant
Hi
I am having two problems with the migrator add-on (latest plugin). Firstly the search and replace uses a significant (>256Mb of memory) which I think isn’t reasonable.
Search and replacing table: wp_b5guqi_options: rows: 437
Search and replacing table: wp_b5guqi_postmeta: rows: 16720
Searching and replacing reached row: 5000
Searching and replacing reached row: 10000
Searching and replacing reached row: 15000
Search and replacing table: wp_b5guqi_posts: rows: 9799
Searching and replacing reached row: 5000Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 249856 bytes) in /home/dh_myuser/mysite.co.uk/wp-content/plugins/updraftplus/addons/migrator.php on line 1352
There has been a critical error on your website. Please check your site admin email inbox for instructions.I can solve this by bumping the memory available to 512Mb but this seems a huge burden just to run the search and replace on migration – can this be optimised / adjusted
Secondly the migrator doesn’t seem to handle cases where the https:// prefix is in mixed case such as https:// below – so leaves links & references to the old site
img class=”aligncenter size-medium wp-image-3370″ title=”Page 1 FrontCover” src=”https://myoldsite.co.uk/wp-content/uploads/2019/12/Click.jpg” alt=”” width=”209″ height=”300″
Can someone please test and advise
Thanks
February 26, 2020 at 2:34 pm #521070Bryle CroduaModeratorHi Steve,
I would recommend optimising your database so it does not use a lot your site memory. You can try our other plugin here – https://wordpress.org/plugins/wp-optimize/
UpdraftPlus will actually automatically replace the old URL with the new URL.
UpdraftPlus also has search and replace database tool that can be used to update links if they were not updated in the migration or for some other purposes. To do this:
– Go to the Advanced Tools tab in the UpdraftPlus dashboard
– Find the Search/Replace Database tool
– In ‘Search for’, enter the original/old site URL
– In ‘Replace with’, enter the new site URL
– Click ‘Go’PLEASE NOTE, this performs a full search and replace operation on the database, and is not reversible. Please take extreme care when inputting the URLs.
After clicking Go, every instance of the old URL will be replaced by the new.
If this does not work, then it is likely that the URLs are either encoded in the database, or manually set in the theme files. In which case, you will need to update these links manually.
Kind Regards,
BryleFebruary 29, 2020 at 11:38 am #521080Steve BanksParticipantThanks Bryle
It’s not a problem with encoded URLs or hardcoded in themes – it’s to do with the case.
Are you able to confirm if the search & replace is case sensitive or not? My problem with the migrator is that if links are set with https:// (note capital H) instead of https:// then they don’t get replaced. Does the manual replacement tool in effect do the same thing.
And if I searched and replaced for MySite , would it also replace mysite and MYSITE and all other variants? the screen doesn’t give much information away as to what it is programmed to do.
Regards
Steve
February 29, 2020 at 11:41 am #523004udadminKeymasterHi Steve,
The manual search/replace tool accepts arbitrary input/output. It is not case sensitive. So, you can use it to run all the search/replaces desired, but you’ll have to run them individually.
I’ve created a task in our development tracker to look at automatically handling non-lower-case versions of https:// (which is pretty unusual – after all these years, this is the first time I’ve heard someone mention it). It shouldn’t be complex to achieve.
February 29, 2020 at 12:17 pm #523024Steve BanksParticipantThanks, I agree that I have never seen mixed-case http before but the ingenuity of humans be creative means that we’re forever chasing our tail here :). Would the same issue occur on the domain part of the site, so if there was a mix of MySite.com and mysite.com would only the one exactly matching the wordpress configured site URL be replaced? I might have to try and get the site harmonised before I start.
Do you have any comment on the memory usage (from the first post) . Needing >256Mb to perform a search and replace doesn’t seem like a sustainable way to do it. Yes it’s a site with a lot of pages (well, a few pages and a lot of revisions..) but a quarter of a Gb of RAM is more than enough to hold the entire database in one go so it seems something is sub-optimal in that process.
Thanks
Steve
-
AuthorPosts
- The topic ‘migrator – memory and search and replace issues’ is closed to new replies.