WordPress failed to import media is one of the common problems that any user can face. Several reasons may have led to this message “failed to import media wordpress”. In this article on wpexpelor, we are going to dive into the effective problem-solving strategy as all of our other contents.
Failed to import media wordpress xml
Suppose you have exported all website content (a file which contains posts, media, pages, etc.) as an XML file. Now you want to import data to other wordpress websites. To do so, you can use the “WordPress Importer” plugin.
Note! Your media, such as pictures and videos, won’t be saved in this file! Just their address will be kept in this XML file. Believe us! If you open the file with an editor, you just access some text and not the media. But why?
As we said before, that’s because only the addresses will be saved here and not the media itself. So important conclusion is that this method will only work if the media you want to upload to the destination website is already accessible on the source website.
Increase wordpress file upload size to import desired XML size
One of the other important things we should mention here is XML file size. It should not be larger than the standards.
But if it is, you can simply increase wordpress file upload size. To do so follow the instructions:
From the host management panel, open the file manager section. Open public_html and look for the .htaccess file. Edit the file to add this code:
php_value upload_max_filesize 256M
php_value post_max_size 256M
Before you start to import XML file, increase the PHP memory limit. You can easily increase the limit by following the instructions:
From the host management panel, open the file manager section. Open public_html and look for the wp-config.php file. Look for:
/* That’s all, stop editing! Happy publishing. */ and just before that you should
Edit file to add this code:
define ('WP_MEMORY_LIMIT', '512M');
Also, before importing the .xml file, go to your host’s file manager and make sure that the access level of the uploads folder is set to 755 in the wp-content folder.
And that’s all! Now, you can insert your desired file. To import the file, go to tools from the WordPress dashboard and click on import. Other reasons may also lead to “WordPress failed to import media.” we are going to discuss them in the next paragraph!
WordPress failed to import media : other reasons
Other reasons may led to the problem of “failed to import media wordpress”. In this section, we are going to write about the:
- Your Internet speed: Make sure that your Internet connection is established and has a suitable speed. If necessary, contact your ISP.
- Hosting resources: Sometimes, “wordpress importer failed to import media” due to the lack of hosting resources. Make sure your hosting service provides you with enough resources, including RAM, CPU and space.
- Slow hosting speed: Your site’s speed may be inappropriate, and this is one of the common reasons why you can get errors when you are importing XML files.
- Firewall and security plugins and proxies: sometimes, security plugins prevent XML files from being imported. Make sure your system security plugin and proxies are disabled.
I hope this article about “WordPress failed to import media” would have helped you. Please feel free to comment any questions.