Title: cannot import
Last modified: March 19, 2025

---

# cannot import

 *  Resolved [mrsmith11](https://wordpress.org/support/users/mrsmith11/)
 * (@mrsmith11)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/cannot-import-13/)
 *     ```wp-block-code
       Hello, when importing website,it shows;WordPress files gathered.for more than 4 hours.and import will never complete.sometimes, it says; 99% database complete… for more than 4 hours.and I gave up importing, and wordpress is collapsed.why this error occurs?database name and mysql user should be match?by the way, I am using AWS EC2. is there some permission problem?I did 777 permission below. but It does not work either./wordpress/wp-content/ai1wm-backups/wordpress/wp-content/plugins/all-in-one-wp-migration/storageis there more rules for import website?
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [Yani](https://wordpress.org/support/users/yaniiliev/)
 * (@yaniiliev)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/cannot-import-13/#post-18372748)
 * It looks like your import is getting stuck at the database migration stage, which
   can happen due to a few reasons, especially on AWS EC2. Here are the most common
   causes and solutions:
    1. Check Server Resources (Memory & CPU) AWS EC2 instances(
   especially small ones) might not have enough resources to process the import.
   Try: – Increasing the memory limit and execution time in php.ini:
 *     ```
       memory_limit = 512M
       max_execution_time = 6000
       post_max_size = 512M
       upload_max_filesize = 512M
       ```
   
 * – Restart Apache/Nginx after making changes:
 *     ```
       sudo service apache2 restart  # for Apache
       sudo service nginx restart    # for Nginx
       ```
   
 * 2. Database Timeout Issue
    If the import is stuck at 99% database complete, the
   database might be too large, or the MySQL connection is timing out. Try: – Increasing
   MySQL max_allowed_packet in my.cnf:
 *     ```
       [mysqld]
       max_allowed_packet = 256M
       wait_timeout = 600
       ```
   
 * – Restart MySQL:
    `sudo service mysql restart`
 * 3. Increase Swap Memory (For Small Instances)
    If on a low-memory AWS EC2 instance,
   increase swap space:
 *     ```
       sudo fallocate -l 2G /swapfile
       sudo chmod 600 /swapfile
       sudo mkswap /swapfile
       sudo swapon /swapfile
       echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab
       ```
   
 * Let me know if you need further clarification! 😊

Viewing 1 replies (of 1 total)

The topic ‘cannot import’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-wp-migration/assets/icon-256x256.png?rev=2458334)
 * [All-in-One WP Migration and Backup](https://wordpress.org/plugins/all-in-one-wp-migration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-migration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-migration/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-migration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-migration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-migration/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Yani](https://wordpress.org/support/users/yaniiliev/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/cannot-import-13/#post-18372748)
 * Status: resolved