Support

Site Restoration

#37435 Database Restoration Inordinately Long

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
8.1.7
CMS Type
WordPress
CMS Version
6.0.0
Backup Tool Version
7.6.4
Kickstart version
8.1.6

Latest post by nicholas on Thursday, 07 July 2022 05:24 CDT

arnold.pietersen

Hi

Just checking what I can do to improve the restoration of a WordPress website on the localhost. When it restores the database, it takes hours. See attached screenshot.

I have experienced this with a number of websites I have restored on the localhost' the database restoration takes its own time.

Anything I can do to speed it up.

 

 

nicholas
Akeeba Staff
Manager

Besides moving the site to Joomla, no, you can't do anything. I am not being sarcastic, I am being factual (unfortunately).

The biggest problem with WordPress is that it stores data in text fields as PHP serialised data, using hardcoded filesystem paths and URLs. Because of the way serialised data is encoded you can't do a simple search and replace across the database and call it a day. You have to read each row, perform a time consuming per row search and replace and serialised data structure update, then write the row back to the database. Compared to a MySQL search and replace it takes anywhere between 1,000 to 1,000,000 times as much time, typically around 10,000 to 100,000 as much time. This is the part which will take literal hours.

Joomla, on the other hand, does not store hardcoded filesystem paths and URLs and it does not store data as serialised data (it uses normalised tables, as people figured out this is the most efficient way to store data since the 1970s). That's why restoring a Joomla site takes incredibly less time than WordPress. You don't have to do this mind bogglingly slow search and replace across each row of each database table. You just... restore the database.

As long as you're using WordPress moving the site will involve this search and replace. Our data replace is one of the most efficient ways to do that (there are slightly faster algorithms —by 5% or thereabouts— BUT they break when moving the site across similar domain names). So, as I said, your problem is that you're using WordPress and there's really nothing much you can do about this. Sorry :(

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!