Support

Akeeba Backup for WordPress

#27644 Restore a WP multisite to xampp environment

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.

Environment Information

WordPress version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by damnsharp on Wednesday, 03 May 2017 04:37 CDT

damnsharp
Hi Nicholas,
I want to create a test environment for a WP multisite I administer from a multisite.

The site (example names):
http://wptest-sitename.nl
http://wptest-sitename.nl/site02

I want to restore to a Xampp enviorenment
http://localhost/wptest-sitename/

I can login and see the site but when I go to a page or post I see the Xampp home page.

A test fresh install multi-site on Xampp works.
http://localhost/multisite-test/
http://localhost/multisite-test/site02

How can I restore a multisite to a Xampp environment? Is it possible and is there a manual for it?
Thanks!

nicholas
Akeeba Staff
Manager
You won't be able to do that because of a WordPress restriction. All multisite installations MUST be installed in the root of the domain name. That means that you can only restore your multisite installation into http://localhost but NOT a subdirectory such as http://localhost/wptest.

Unfortunately this is not something that has to do with Akeeba Backup. Akeeba Backup can and does replace all the internal URLs with the new ones. The problem lies in WordPress itself and the black magic it does under the scenes to give you the illusion of a multisite installation. It has a hardcoded assumption that the first segment of the URL path (the thing after the first forward slash and before the second forward slash, if it exists) is the multisite name. That's why it's not possible to restore to a straight up XAMPP environment.

Can you restore mutlisites locally? Absolutely, but it needs trickery on your part. It requires creating custom DNS records for a live domain and a virtual host on your Apache installation. It's complicated (to put it mildly). Alternatively you can use MAMP Pro for Windows or for Mac (unfortuantely a paid solution) to create a local, fake domain such as http://wptest.damiaan - but this won't work with Microsoft Edge for obscure technical reasons.

Note that none of these would be necessary if WordPress did a better job at handling multisite installations. Unfortunately that's not the case. I am as frustrated as you are for two reasons. First, this makes it hard for me to assess multisite WordPress transfers for development and pre-release testing. Second, you are by far not the first person to ask that question. We get it at least once a week, half of the times reported as a bug. The perils of being the only backup solution to support multisite restoration to a different server, I guess.

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!

damnsharp
Good afternoon Nicholas,
Thank you for the comprehensive answer!
I believe that it indeed is frustrating for you and time consuming replying to customers.
You answered also on a previous support question of mine which I had a kind of similar problem.

The thing I don't understand is that I cán install WP as a multisite on Xampp within a subdirectory.
A test fresh install multi-site on Xampp works.
http://localhost/multisite-test/
http://localhost/multisite-test/site02

Could you explain why that's working and restoring not? Thanks!

nicholas
Akeeba Staff
Manager
I believe that has to do with the way WordPress sets up the .htaccess file. However, I have not been able to find the conditions which allow a multisite to work successfully inside a subdirectory.

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!

damnsharp
Thanks @Nicholas, I understand it. I will close the call, no problems.

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!