Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am importing from one WordPress multisite instance to another, using Tools -> Export to generate a WXR file that I then import with and Tools -> Import . I receive the "Failed to import media" message for all files.

When I look at the apache log(on the production server, which is importing) I get:

[Wed Nov 13 11:05:30 2013] [error] [client 10.11.1.13] client denied by server configuration: /var/vhosts/wordpress/html/wp-content/uploads/sites/10, referer: http://drawyourweapons.wordpress.drake.edu/

The path on the test server I am importing from is: /var/vhosts/wordpress-test/html/wp-content/uploads/sites/10

The path to the new site on the production server is: /var/vhosts/wordpress/html/wp-content/uploads/sites/6

I do not understand why it is trying to get to that site on prod

share|improve this question
    
Did you check the file permissions for the wp-content folder? Needs to be 755. –  eskimo Nov 13 '13 at 21:25
    
yup, wp-content is set to 755 –  Purcell Nov 13 '13 at 21:58
    
Hmm. That's the only thing I can think of since it says denied by server. All the subfolders and files of wp-content are also set to 755? If so, someone with more expertise should look at this. Or you can manually move your media library, however that can be very frustrating as I know from recent experience :-). Can give you some tips though if you're going for a manual move. –  eskimo Nov 13 '13 at 22:53
    
The error actually seems to be the server trying to write to a folder that doesn't exist. On the test server (exported from) the site ID was 10, on the production server (importing to) the site ID is 6. So I am really confused why the importer is trying write to a folder for a site ID that doesn't exist. the error log is from the production server, which is being imported to –  Purcell Nov 13 '13 at 23:32
    
Please update your question with any new info, rather than posting it in comments. Also: Are you using WordPress's import & export functionality (ie WXR files), or are you trying to import from a SQL export or something? –  Pat J Nov 14 '13 at 4:21

1 Answer 1

up vote 1 down vote accepted

I've created a patch that will work around this issue. This patch is for WordPress 3.6.1. It is a hack, not something that should be taken very seriously except that it points out where the problem may be. I don't know PHP, but was able to trace it back to this point before giving up. I expect someone with more familiarity with the WordPress code base could figure out what the problem is once they see the patch and see what code is being modified.

I did notice that the code is doing a lot of checks against the IP of the remote server. I'm not sure the justification for checking whether the remote server is on a private network, but that may be part of the issue. The server we exported from is on 10.10.2.16, while the server we import on is 10.10.1.206. Both are on the same private network.

The patch is available here: http://pastebin.com/LeVtWKhX

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.