Support

Akeeba Backup for WordPress

#30780 – Multisite restore single site

Posted in ‘Akeeba Backup for WordPress’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Monday, 14 January 2019 04:00 CST
Hi great team,
Is it possible to restore a single site from a multisite back-up to a newly installed multisite?
I think it is difficult or not possible, but I am not sure.
And when it is not possible do you know a different way?

Thanks!
Damiaan.
Custom Fields
WordPress version (in x.y.z format) 5.0.3
PHP version (in x.y.z format) 7.1.25
Akeeba Backup version (x.y.z format) 3.3.1
damnsharp
Monday, 14 January 2019 04:51 CST
In short, while it is somewhat possible it's complicated enough that I wouldn't recommend it unless there's a really good reason (i.e. someone is paying you per hour to do this).

WordPress does not really create multiple sites in a multisite installation. It has a single installation and uses different sets of database tables to make it look like there are multiple sites. Information about these tables and how they correlate to individual "sites" are stored in the actual (main) site's database. That's why WordPress now uses the terminology blog network instead of "multisite" and refers to each individual "site" as a blog.

What this means is that you cannot extract a single blog from the network since its data is entangled with that of the blog network (main) site which is in its turn entangled with all the other blogs. To make matters worse, WordPress holds theme and plugin configuration parameters in both the blog network site and the individual blogs. Since this data is serialized PHP data it is very complicated to merge them. For the same reason you can't directly convert from a blog network to a single site installation, dropping other blogs in the process.

What you can do is restore the entire blog network locally, e.g. using MAMP, XAMPP or WAMPserver as your local server environment, then follow these complicated instructions. I would call this process the diametrically opposite of user-friendly but at least it clearly demonstrates why such a feature is not implemented in an automated fashion...

Alternatively, you can use WordPress export and import features to export the content of a blog and import it into a new, single site installation. The obvious problem with that approach is that everything that's not a WordPress post needs rebuilding from scratch.


Nicholas K. Dionysopoulos

Lead Developer and Director



Greek: native

English: excellent

French: basic



Please keep in mind my timezone and cultural differences when reading my replies. Thank you!



nicholas
Thursday, 17 January 2019 08:08 CST
Thank you Nochilas for your complete answer!
I thought so it is difficult to move a single site out of a WP Multisite installation.

Why I asked the question is because of the following.
I have a problem with a multisite with images.
I want to backup/restore a multisite to a new location and remove all sites (except one site).
That would not be a problem, but the multisite has a configuration problem (I think). It stores all the images in public_html/wp-content/blogs.dir/
That's an old way of storing media files I have read.
I think it is better that the media files are stored in /public_html/wp-content/uploads/sites/

When I look in htaccess file I see the followin line, which I think is the culprit:
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

I am curious, is in your opinion wrong to nowadays the use of blogs.dir o.k. or wrong?
And is it solvable to move images to uploads/sites and use that folder as upload dir?

Thanks!
damnsharp
Friday, 18 January 2019 02:36 CST
The issue you have is not with Akeeba Backup. Unfortunately I cannot help you with it. It looks like you have a really old multisite installation dating back to when there were two separate WordPress releases, the regular and the multisite. That was before my time with WordPress; we were a 100% Joomla shop back then.

I think you're better off asking these questions at the WordPress forum or a local Facebook group. There are people who have been around that long and possibly know how to help you with that.

Another approach is doing what I described and then doing two things. First move the files into the wp-content/uploads folder. Then do a mass replacement in the database to change /files/ with /wp-content/uploads/. However, you need a tool which won't bork your database's serialized data. We have been working on a plugin which does exactly that. If you're interested let me know, I'll send you an installable build. FWIW it's the same data replacement engine powering Akeeba Backup's restoration script (ANGIE) since December 2018 so it's actually been battle tested already :)


Nicholas K. Dionysopoulos

Lead Developer and Director



Greek: native

English: excellent

French: basic



Please keep in mind my timezone and cultural differences when reading my replies. Thank you!



nicholas
Friday, 18 January 2019 02:41 CST
Hi Nicholas, I understand.
And yes please, when you can send me the installable build for WP of the replace software, that would be great.

Have a nice day.
damnsharp
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

Support Information

Working hours: Typically we work Monday to Friday, 9am to 7pm Cyprus timezone (EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets, but we cannot respond to them, outside of our working hours.

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!

Cookies Notification - Action required

This website uses cookies to provide user authentication and improve your user experience. Please indicate whether you consent to our site placing these cookies on your device. You can change your preference later, from the controls which will be made available to you at the bottom of every page of our site.