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.
Tuesday, 02 May 2017 03:11 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!

Custom Fields

WordPress version (in x.y.z format) 4.7.4
PHP version (in x.y.z format) 5.6.29
Akeeba Backup version (x.y.z format) 2.1.3
 
Tuesday, 02 May 2017 04:28 CDT
nicholas
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



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



Tuesday, 02 May 2017 05:11 CDT
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!
 
Tuesday, 02 May 2017 09:08 CDT
nicholas
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



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



Wednesday, 03 May 2017 04:37 CDT
damnsharp
Thanks @Nicholas, I understand it. I will close the call, no problems.
 
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!