Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 3 replies, has 1 voice.

Last updated by Andreas W. 5 months, 1 week ago.

Assisted by: Andreas W..

Author Posts
January 6, 2025 at 11:47 pm #16567657

gilesB-2

Background of the issue:
I am trying to import CPT files on my site hidden link. I am using WP All Import Pro, WPML All Import, WPML Export and Import, WPML Multilingual CMS, and WPML String Translation. The files export correctly and are saved as a 'bundle'. The file appears to upload correctly. I am following documentation from both WPML and WP All Import.

Symptoms:
Pressing the button to continue (either straight to step 4 or continue to step 2) gives an error: WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query INSERT INTO `xxxxxxxxx_options` (`option_name`, `option_value`, `autoload`) VALUES ('_wpallimport_session_new_', SOME SORT OF BLOB HERE, 'off') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`). Additionally, there are multiple PHP warnings about an undefined array key 'wpml_addon' in the WPML All Import plugin.

Questions:
How can I resolve the 'max_allowed_packet' error when importing CPT files?
What causes the undefined array key 'wpml_addon' warnings in the WPML All Import plugin?

January 7, 2025 at 5:54 am #16567992

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thanks for contacting WPML Support.

Before this thread gets assigned to my colleague, I'd like to offer some initial guidance or potential solutions.

I understand the issue you're facing. The 'max_allowed_packet' is a MySQL variable that determines the maximum size of a packet the MySQL server can read or write over the network. If you're encountering issues related to 'max_allowed_packet', you may need to adjust your MySQL configuration file and increase its value to resolve the problem.

To better understand the process, please check this guide: hidden link
If you don’t have access to modify the MySQL configuration file, you can contact your hosting support team and request them to increase the `max_allowed_packet` size for you.

Additionally, I noticed that some server-related variables, such as "WP Memory Limit", "max_execution_time", and "MaxInputVars", are currently set below the recommended levels. It’s important to increase these values for better performance. Here are some helpful guides:

- https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#increasing-memory-allocated-to-php)
- hidden link)
- hidden link)

I hope this information is helpful! Let us know if you need further assistance.

The PHP warnings about an undefined array key 'wpml_addon' might be related to the PHP version being used. However, if these warnings are causing any functionality issues, it would be helpful if you could provide more details about the error. Sharing the complete error log containing the warning will allow us to better understand the root cause and provide an appropriate solution.

Let us know the update. We'll be happy to help iif you need further assistance in this matter.

Best regards,
Prosenjit

January 10, 2025 at 10:34 am #16581552

gilesB-2

Thanks for getting back to me Prosenjit,

Trying different setting has helped but not entirely successful. It is definitely something to do with this.

The error file was pretty much as above I just removed the massive BLOB

Kindest regards,
Giles

January 11, 2025 at 8:28 pm #16584724

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

If you are still getting the 'max_allowed_packet' error, then you might need to consider adjusting its MySql settings value to a higher number.

For example, if the import file has a size of 50MB then the value needs to be higher than this:

Let's say you would like to set the limit for files that can get uploaded to the server to 500MB, then you change the existing line in the file my.ini or ~/.my.cnf on your server's SQL folder;

max_allowed_packet=500M

After that, you will need to restart the MySQL service and you are done.

I suggest you consult your hosting support in case you need assistance with this adjustment.

Best regards
Andreas

The topic ‘[Closed] I am unable to import CPT files.’ is closed to new replies.