• Resolved TonyAwards

    (@tonyawards)


    I am trying to get an offline duplicate of a live WP installation. I did an export of the full .xml file and downloaded it to my computer. But when I try to import it with wordpress-importer I get:

    Sorry, there has been an error.
    The uploaded file could not be moved to /home/spike/Projects/_Websites/public_html/blog/wp-content/uploads/2011/07.

    I have checked settings in lampp and have set all the directories in the path to 775 (rwxrwxr-x) but it still won’t upload it. I even created the 2011 and 07 directories and manually installed the plugin because I am having some ftp issues that are still not sorted out (subject for another forum post…).

    Any ideas as to how to debug this and what is causing it (my ftp problems, or…)?

Viewing 4 replies - 1 through 4 (of 4 total)
  • My error message is similar. I’m noting it here (I have a separate thread as well) in case TonyAwards gets a response helpful to me. My “fixes” were similar and did not work, either.

    The notice I got:
    Before you can upload your import file, you will need to fix the following error:
    Unable to create directory /home/longhand/public_html/wp-content/uploads/2011/07. Is its parent directory writable by the server?

    TonyAwards: definitely a permissions issue. Sounds like the PHP process/webserver is not the owner or in the group that owns these directories. Try making the directories writable to others (777). This is not good practice for shared hosts, but since this is your local install it’ll be okay. Or you could set the owner of the directories to the user that the server runs as.

    I got my importer to work, finally, first by creating an uploads folder, manually, in wp-content … the WP install did not automatically create an uploads folder for some reason. I used Control Panel-File Manager to create the folder.

    Second, in File Manager I changed the permission of wp-content and the new uploads folder to 777. Bingo, all worked smooth and fast.
    Third, on a friend’s advice, once all was tested, I returned the permissions of these two folders to 755. At this level I have uploaded individual images.

    Thread Starter TonyAwards

    (@tonyawards)

    Jon Cave – exactly right, you’re the man. I changed perms on all directories to 777 leading down the path to the ‘/07’ inside the uploads directory, tried the importer again… bam. Done. All the xml’s data is here offline. Now I’ll try further live site replication with some plugins, etc.

    And just as you said, longhand, it worked. I had already manually created the public_html/blog/wp-content/uploads/2011/07 path, I just had to give all of it 777s (which I’ve left alone ‘cos it’s just me working here).

    Thank you both for reading and responding to the thread – it has saved a lot of further teeth-gnashing…

    I’ll call this ‘solved’ and hope the rest of it goes as well. ;-).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP-Importer Uploaded file could not be moved’ is closed to new replies.