I am changing my website hosting, so I made a backup for everything, themes, DB and used the Export utility in WP to export all posts, pages, etc.
Now I am trying to import posts, pages, users in the new hosting but I am getting the following errors:
Failed to create new user for John Their posts will be attributed to the current user.
Failed to create new user for guest. Their posts will be attributed to the current user.
Failed to create new user for Sam. Their posts will be attributed to the current user.
Failed to import Media âMW profileâ
Failed to import Media âLA houseâ
Failed to import Media âGoldâ
Failed to import Media âArchiveâ
Failed to import Media â21882183â
…etc
I checked the import xml file, paths inside it but I don’t see any problem as paths in the import XML file are exactly the same as images real paths.
So can someone please tell me what I might be doing wrong here, and how to solve this problem?
Here’s what I’d do:
(at this step you’ll have a full, complete backup of your original WP install).
If necessary, adjust the database connection parameters on your
wp-config.php
file to reflect your new hosting (some hosts force the db prefix name, and it could be different from your original db name).You should now have an identical WP install on every aspect.
I had this issue and realized that it was due to a WordPress security validation on the URLs. It checks to ensure that the remote host is not the same as the local host (for some reason).
I had code that used to work, and then failed recently, so I’m guessing it was a recent addition. It looks like there’s a filter to disable it, and it works for me using this filter.
I had the same problem with message “failed to import media …”
Finally the problem was found in folder “uploads” permission.
So please try to change permission so that Apache User will be able to write into “uploads” folder (and sub-folders, if any).
If you’re not sure who is Apache User, simply change the permission so that “Everyone” can Read/Write/Execute, in other words, set folder permission to “777”
wp-content
uploads