Skip to content Skip to sidebar

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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

This topic contains 1 reply, has 0 voices.

Last updated by Bobby 4 months, 2 weeks ago.

Assisted by: Bobby.

Author Posts
September 15, 2025 at 12:41 pm #17402240

mathiasJ-2

Background of the issue:
I am trying to resolve a WordPress database error related to WPML on my website. My error logs are filled with the following error: [15-Sep-2025 05:57:16 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT element_id, language_code FROM wp_icl_translations WHERE trid = (SELECT trid FROM wp_icl_translations WHERE element_type = 'post_page' AND element_id = (SELECT option_value FROM wp_options WHERE option_name='page_for_posts' LIMIT 1)) made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, LiteSpeedCore->send_headers, LiteSpeedControl->finalize, LiteSpeedMetabox->setting, get_option, apply_filters('pre_option_page_for_posts'), WP_Hook->apply_filters, SitePress->pre_option_page_for_posts, WPML_Pre_Option_Page->get. Initially, I suspected the issue was due to Litespeed, but their support confirmed it is related to WPML.

Symptoms:
WordPress database error: Commands out of sync; you can't run this command now.

Questions:
How can I resolve the WordPress database error related to WPML?
What steps should I take to troubleshoot this issue without using direct chat support?

September 15, 2025 at 10:57 pm #17403982

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Reviewing this query it looks like another query left the database in a shutdown state, and it does not necessarily look like a bad query coming from WPML.

If possible, please try the following and let me know your results.

1. Temporarily deactivate LiteSpeed Cache and clear any server-side cache/Redis/Memcached.

2. update WPML and it's add-ons to their latest versions.

Go to plugins->Add new->commercial tab and click on "check for updates"

3. Run the WPML troubleshooting actions

In WPML → Support → Troubleshooting, run (in this order): Clear the cache in WPML, Set language information, Fix post types assignment, Remove ghost entries, and Synchronize posts taxonomies. These don’t delete content and often clear translation-table edge cases

If the issue persists, Go in your wp-config.php file and look for

define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);

Edit your wp-config.php file and add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . 'hidden link');

This will create an error_log.txt file in your site's root directory. Please send me its contents.

The topic ‘[Closed] WordPress Database Error with WPML’ is closed to new replies.