Vai al contenuto Vai alla barra laterale

Questo è il forum di assistenza tecnica di WPML, il plug-in multilingue di WordPress.

La sua lettura è permessa a tutti, ma la pubblicazione è riservata esclusivamente ai clienti di WPML. Il team di WPML risponde sul forum 6 giorni su 7, 22 ore su 24.

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

Fuso orario del supporto: Asia/Dhaka (GMT+06:00)

Questo ticket contiene 27 risposte, ha 1 voce.

Ultimo aggiornamento da Prosenjit Barman 2 giorno, 14 ora fa.

Assistito da: Prosenjit Barman.

Autore Post
Gennaio 21, 2026 alle 5:43 am #17748850

Prosenjit Barman
Sostenitore di WPML dal 03/2023

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hi,

Thank you so much for providing all this detailed information — it's incredibly helpful for our investigation.

I'll begin conducting a thorough investigation on lucacastelli.com to try to replicate the issue. The access credentials you shared earlier are still working, and I was able to log in successfully.

Before I proceed with deeper testing, I wanted to share an important concern: since lucacastelli.com is your live production site serving real visitors, there's a possibility that during intensive troubleshooting and testing, the site could experience temporary issues or downtime. This could potentially affect your visitors and business operations.

To ensure we can investigate thoroughly without any risk to your production environment, do you have a staging or development site where you're able to replicate this issue, so that we can conduct extensive testing safely?

If you have a staging environment available, please share the access credentials in your next response. I've enabled the private fields below so you can securely provide this information.

If you don't have a staging site available, and you're comfortable with us conducting the investigation directly on your production site, please confirm this in your next response. I want to make sure we have your explicit approval before proceeding with any testing that could potentially cause temporary disruptions.

This is clearly a critical issue that's affecting your site's stability, and I'll try my best to find a permanent solution for you.

Looking forward to your response so we can proceed with the investigation in the safest and most effective way possible!

Best regards,
Prosenjit

Gennaio 21, 2026 alle 9:04 am #17749315

jemalG

Good morning, I have created a copy of the server and transferred all the data.

Here the data: link nascosto

Gennaio 22, 2026 alle 4:50 am #17752366

Prosenjit Barman
Sostenitore di WPML dal 03/2023

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hi Jemal,

Thank you for sharing the access information. I was able to log in to your staging site successfully.

Before diving deeper into the investigation, I checked your LiteSpeed Cache configuration. I noticed that the LiteSpeed setup is quite aggressive in its caching settings. Based on the error patterns you've described, the fatal error is most likely being caused by a persistent `lsphp` process holding a corrupted version of the `ApiInterface` in its private memory segment.

However, to see the debug logs, I tried to log in using the FTP credentials you provided, but unfortunately they're not working.

So, to work around the FTP issue, I installed a File Manager plugin on your staging site to access the file system. When I activated the plugin and tried to access it, I immediately encountered a "503 Server error from LiteSpeed"

From that point on, I couldn't access the backend anymore, I'm now seeing a fatal error. Although the details about the Fatal error is not showing, but this scenario closely matches the issue you originally reported.

The important discovery here is that I was able to trigger this issue without performing any WPML operations — simply by activating a third-party plugin and trying to access it. This strongly suggests that:

- The issue is not limited to WPML specifically
- It's a more generic server/caching issue
- LiteSpeed's aggressive caching is likely causing class definition corruption in memory

To restore the staging site and continue our investigation, please:

1: Clear object caches and restart
- Log into your hosting control panel
- Clear all object caches for the staging site (there should be cache management options)

OR, simply restart the server for the staging site. This should restore access to the backend

2: Disable REST API Caching
Once the site is restored:
1. Go to LiteSpeed → General
2. Disable REST API Caching
3. Save the settings
4. Try sending a batch for automatic translation
5. Let me know if the fatal error still occurs

Note: I'm not suggesting we disable Object Cache entirely, as we've ensured WPML's compatibility with it. However, if the issue persists even after disabling REST API caching, we'll need to investigate what's being stored by Object Cache keys that might be causing the corruption.

Please also verify and update the FTP credentials for your staging site. Having working FTP access is important because, if this problem occurs again, I can access the file system directly and I can restore the site without needing to bother you.

Please let me know how it goes, once you've completed these steps, and I'll continue the investigation based on the results. Looking forward to your response.

Best regards,
Prosenjit

Gennaio 22, 2026 alle 9:05 am #17752797

jemalG

Hello Carissimo, how are you? Thank you for your help. This time it was a Google error because it couldn't find the correct domain. I disabled the Google and Facebook plugins. Now you can check that WPML is working properly and see if you can figure out why the tables can't be repaired.

I sent you the FPT access details again. I tested them myself and they now work.

link nascosto

Gennaio 23, 2026 alle 5:31 am #17755824

Prosenjit Barman
Sostenitore di WPML dal 03/2023

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hi there,

Thank you for sharing the credentials.

I tried to access your staging site, and this time I simply tried to access the backend without making any changes. Unfortunately, I immediately encountered a "503 Server error".

Since you provided FTP access, I was able to check the debug log directly. Here's what I found through systematic investigation:

Step 1: Initial findings
- The debug log initially showed errors related to WPML and WooCommerce Multilingual
- I temporarily deactivated these plugins by renaming their directories

Step 2: Issue persists
- Tried to access the site again — still no luck
- The debug log now points to errors in:
- WooCommerce plugin
- Elementor
- WP SEOPress
- WP SEOPress PRO
- I disabled these plugins as well by renaming their directories

Step 3: Deeper problem revealed
- Even with all problematic plugins disabled, the site remained inaccessible
- The error changed from 503 to "500 Internal Server Error."
- I checked the PHP error log (accessible via FTP) and discovered something concerning:
- WordPress core files appear to be corrupted
- Core functions are showing as undefined
- Required libraries are not loading
- This indicates the problem extends beyond just plugins

Step 4: Additional troubleshooting
I tried several more fixes:
- Modified `wp-config.php` settings
- Disabled object cache
- Removed cache from the uploads directory
- Cleared all cached files

Result: The site is still inaccessible, consistently showing:
> "503 Service Unavailable - The server is temporarily busy, try again later!"

Based on this thorough investigation, I can confirm that:

1. This is not just a WPML issue - The problem affects the entire WordPress installation
2. Not limited to plugins - WordPress core files are also affected
3. Core file corruption - Critical WordPress functions and files are having loading issues
4. Likely causes:
- Aggressive caching corrupting core files
- Modified WordPress core files
- Server-level OPcache corruption
- File permission issues

To proceed effectively, I need to understand:

1. Have WordPress core files been modified in any way?
- If yes, which files were modified?
- What was the purpose of these modifications?
- Were these modifications made directly, or through some automated process?

2. Custom server configurations:
- Are there any custom PHP configurations?
- Any custom autoloading mechanisms?

To help isolate whether caching is the root cause, please:

Step 1: Disable ALL caching
- Access your hosting control panel
- Disable ALL cache settings for the staging site, including:
- LiteSpeed Cache
- OPcache
- Object Cache (Redis/Memcached)
- Page Cache
- Any other caching layers

Once all caching is disabled, try accessing the staging site and check if you can access it without errors.

If the site is accessible after disabling caches:
- Let me know immediately
- Re-enable caching
- See if the error returns

Ensuring the site is accessible will allow me to continue the investigation effectively.

This is clearly a complex, multi-layered issue. I'll try my best to find the root cause, but I need your help with the caching test and information about any core file modifications to proceed effectively.

Please complete the steps above and let me know the results. I'm standing by to continue the investigation as soon as you provide this information.

Looking forward to your response!

Best regards,
Prosenjit

Gennaio 23, 2026 alle 1:40 pm #17757243

jemalG

Unfortunately, with this server, once it goes to 503, you have to restart it; there is no other solution. We haven't changed anything. I know that some tables are corrupted with wpml, and your troubleshooting cannot fix it because it goes to 503. Now I'll restart it and send you the FTP again. Unfortunately, when we have to deploy, we have to redo the FTP.

Can you test it properly? Because we don't have that many 503 errors in live mode, only when we touch the translations.

link nascosto

Gennaio 26, 2026 alle 5:07 am #17760848

Prosenjit Barman
Sostenitore di WPML dal 03/2023

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hi,

Hope you're doing well. Sorry for the delay in responding over the weekend.

I understand that without restarting the server, there's no way to clear the 503 error. Once you restarted the server, I was able to access the backend and continue my investigation.

Here's what I did and what I discovered:

Step 1: WPML Activation Test
- Activated all WPML plugins
- Result: No fatal errors occurred ✓
- Sent 6 products for automatic translation into all languages (no credits were used)
- Result: All translations processed correctly with no errors ✓

Step 2: LiteSpeed Cache Activation Test
- Activated the LiteSpeed Cache plugin
- Result: A fatal error occurred immediately, right after activating the plugin
- The error was due to a missing WPML library
- The site became inaccessible again

Before activation, everything was working perfectly fine. This strongly suggests that LiteSpeed's caching mechanism is somehow corrupting or clearing critical PHP class files from memory.

Step 3: Recovery Attempt
- Disabled the LiteSpeed Cache plugin via FTP
- Result: The fatal error was gone, but the 503 error persisted
- Site remained inaccessible

At this point, it's almost confirmed that LiteSpeed's aggressive caching settings are causing multiple issues:

- Memory exhaustion from cached class definitions
- Object cache conflicts with PHP class autoloading
- Database lock contention → leading to 503 errors
- Class file corruption in OPcache/memory

To continue the investigation effectively and identify the root cause, I need you to:

1. Do a server restart for the staging site
- This will restore access so I can continue testing

2. Share phpMyAdmin access
- This will allow me to:
- Check for database corruption
- Identify any tables that need repair
- Review autoloaded options for bloat
- Examine WPML-related database entries
- Look for any corrupted serialized data

I've enabled the private fields below so you can securely share the phpMyAdmin credentials.

I completely understand that it's frustrating for both you and me to keep encountering 503 errors that require server restarts to continue investigation. I sincerely apologize for the repeated disruptions.

Going forward, I'll be more careful in my approach:
- I'll read configuration settings directly from the database when possible
- I'll take a more cautious, step-by-step approach before activating plugins
- I'll document each change so we can roll back more easily if issues occur

The testing I've done has revealed critical information:
- WPML works perfectly when LiteSpeed Cache is disabled
- LiteSpeed Cache activation immediately triggers the corruption
- This confirms the issue is a LiteSpeed + OPcache interaction problem, not a WPML bug

With phpMyAdmin access, I should be able to identify exactly what's being corrupted and implement a permanent fix.

Please:
1. Restart the staging site server
2. Share phpMyAdmin access credentials in the private fields
3. Let me know when both are ready

Once I have access, I'll work to identify the root cause and implement a permanent solution so you don't have to deal with these crashes anymore.

I really appreciate your patience and cooperation as we work through this challenging issue together.

Looking forward to your response!

Best regards,
Prosenjit

Gennaio 26, 2026 alle 8:50 am #17761350

jemalG

Hi Prosenjit,

Thanks for the update. However, there is CRITICAL CONTEXT regarding the site history that I must share, which strongly supports your suspicion of "Database corruption" or "Corrupted serialized data".

The Origin of the Issue:

Until August 2025, the site and WPML worked perfectly.

In August, we suffered a Hacker Attack (SQL Injection).

We performed a database restore, but the site has never been 100% stable since then.

The "Smoking Gun" (Why I believe the DB is corrupted): Specifically, whenever I try to use the WPML Troubleshooting page to fix/reset the database tables, the site immediately crashes with a 503 error.

This confirms that there is underlying data corruption (likely resulting from the hack or the subsequent restoration) that causes the crash whenever WPML tries to process those specific database rows.

Action Plan: I have restarted the server and provided the phpMyAdmin credentials below. Please focus your investigation on database integrity, specifically looking for corrupted serialized strings or damaged tables left over from that injection/restoration event.

Best regards,

Gennaio 26, 2026 alle 1:42 pm #17762738

Prosenjit Barman
Sostenitore di WPML dal 03/2023

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hi,

Thank you very much for the information. It clarifies several points.

I have made significant progress in identifying the root causes of the server crashes, but we have hit a technical block that requires another server restart (LiteSpeed and PHP-FPM) to clear.

We identified a "Death Spiral" between WPML and LiteSpeed Cache:

Database Corruption: We found over 17,500 corrupted rows in the WPML tables. Specifically, a single image(ID: 431702) was stuck in a loop, generating 4,300+ duplicate translation jobs. I have successfully purged this data.

Memory Exhaustion: LiteSpeed was configured to cache the REST API and Admin objects. When WPML tried to process its (now massive) translation queue, LiteSpeed tried to intercept it, hitting the server memory limit and causing the 503 errors.

After stabilizing the database, I tried to reactivate LiteSpeed with hardening rules. However, a PHP Path Collision occurred. Because the LiteSpeed folder was renamed during previous debugging, the server's internal memory (OPcache) is now "confused" and is trying to load two different versions of the same plugin files simultaneously. This has triggered a "Fatal Error" and another 503 lock.

Once a 503 occurs in this state, my changes to the files or database cannot take effect because the PHP processes are "stuck" in memory.

Could you please restart the server (specifically LiteSpeed and PHP) so that I can continue the investigation?

Plan for immediately after restart:

- I will perform a clean re-install of the LiteSpeed folder.
- I will implement the final "Bypass" logic I have prepared, which ensures LiteSpeed stays active for your users but ignores the heavy WPML background tasks.

Please let me know once the restart is complete so I can continue and find an optimal solution for this issue.

Additionally, in the private information you previously shared, I can see FTP access details. Have you also provided server access? If so, could you please share the link to access it?

Best regards,
Prosenjit

Gennaio 27, 2026 alle 6:41 am #17764986

jemalG

Hi, unfortunately, access to the server is via Jelastic Cloud, and we don't have root permissions either.

Gennaio 28, 2026 alle 10:26 am #17770026

Prosenjit Barman
Sostenitore di WPML dal 03/2023

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hi,

Sorry for the delay in responding.

I've spent considerable time investigating your staging site and found several critical issues that were preventing it from working properly with the LiteSpeed Cache plugin active. I believe these same issues are affecting your production site as well.

The good news is that I've found a way to restore the staging site when it crashes — by clearing the OPcache using a script. Let me walk you through what I've discovered, what I've done so far, and the solutions that are showing positive results.

I looked at multiple layers of your stack to understand what's happening:

- WordPress database schema and query profiling
- Plugin activation sequences and how they depend on each other
- LiteSpeed LSPHP bytecode cache (OPcache) behavior
- Action Scheduler queue
- Database bloat in the wp_postmeta and wp_options tables
- WPML translation tables integrity
- Server-level caching and PHP-FPM process behavior

Issue #1: LiteSpeed LSPHP Bytecode Cache Corruption:

The LiteSpeed server's LSPHP module maintains a bytecode cache (OPcache) to store compiled PHP code for faster execution. When the LiteSpeed Cache plugin was activated, it triggered a class collision where PHP functions from WooCommerce or WPML were being loaded twice.

The problem is that the server's bytecode cache had stored corrupted compiled PHP code from previous crash states. Even after I modified or deleted plugin files, the server continued serving the corrupted cached bytecode.

This is a server-level caching issue, not a plugin code issue. The LiteSpeed FPM process was serving stale, corrupted bytecode that references PHP files in states that no longer exist on disk.

Solution: I created a script to clear the Opcache, but you can install a plugin called WP Opcache and flush the OPcache from there. After that, the staging site stayed up and running. This approach should work for preventing future crashes.

Issue #2: Action Scheduler Queue Saturation:

Your wp_actionscheduler_actions table contained 22,073 pending scheduled tasks that were never processed. On every page load, WordPress was trying to query and process this massive queue, causing memory exhaustion and 503 errors.

- Normal pending tasks: < 100
- What I found: 22,073 pending tasks

Solution: I canceled all stuck tasks using a direct database query:

-- Cancel all pending/in-progress/failed Action Scheduler tasks
UPDATE StR_actionscheduler_actions 
SET status = 'canceled' 
WHERE status IN ('pending', 'in-progress', 'failed');

-- Verify the fix
SELECT status, COUNT(*) as count 
FROM StR_actionscheduler_actions 
GROUP BY status;

Result: Pending tasks reduced to 0.

Issue #3: Orphaned LiteSpeed Postmeta Entries:

Your wp_postmeta table contained over 81,000 orphaned entries with meta_key values like 'litespeed%'. These were optimization flags left behind by the LiteSpeed Cache plugin that were no longer needed but were still being queried on every product page load.

Your total postmeta rows: 3,133,828 (abnormally high for 76K products)

Solution: I removed the orphaned LiteSpeed meta and optimized the table:

-- Delete LiteSpeed orphaned postmeta entries
DELETE FROM StR_postmeta WHERE meta_key LIKE 'litespeed%';

-- Delete orphaned meta (for deleted posts)
DELETE pm FROM StR_postmeta pm
LEFT JOIN StR_posts p ON p.ID = pm.post_id
WHERE p.ID IS NULL;

-- Optimize the table
OPTIMIZE TABLE StR_postmeta;

Issue #4: Bloated WooCommerce Transients:

Your wp_options table contained a 454KB transient (_transient_wc_products_onsale) that was being loaded on every page request, significantly impacting memory usage.

Solution:

-- Delete bloated WooCommerce transients
DELETE FROM StR_options WHERE option_name = '_transient_wc_products_onsale';
DELETE FROM StR_options WHERE option_name LIKE '_transient_wc_%';
```

You can also remove transients from WooCommerce → Status → Tools.

Throughout my investigation, I specifically tested WPML, WPML String Translation, WooCommerce Multilingual, WooCommerce, and SEOPress in isolation without LiteSpeed Cache. All these plugins functioned correctly without any fatal errors or 503 responses.

The crashes only occurred when the LiteSpeed Cache plugin was active. While the issue is not caused by WPML itself but by how LiteSpeed operates, I continued the investigation since it had been troubling you for some time.

What we found is that the LiteSpeed server-level bytecode cache (OPcache) had retained corrupted compiled code from previous crash states. Because of this, the site kept crashing even after file-level fixes were applied. The problem was resolved only after forcefully invalidating the OPcache so that all PHP files were recompiled cleanly.

WPML is working correctly and is not contributing to this behavior. With LiteSpeed Cache disabled, the site has been stable for over 30 minutes with all plugins active. I also sent more than 70 items for translation, and they were completed successfully without any fatal errors or server issues.

Additionally, even the WooCommerce transient clearing tool was triggering Fatal Error and 503 responses when LiteSpeed Cache was enabled, which did not happen once the plugin was disabled.

Please refer to the attached screenshots for confirmation.

However, I also found a malicious plugin file on your staging site. The file is significantly large and contains code that doesn't appear legitimate. It's located in the /wp-content directory and named plugin.php. If you're not aware of this file, please delete it immediately for security reasons as it could be a leftover by Hacker.

So, in summary, the 503 errors and fatal crashes were caused by:

1. LiteSpeed Cache plugin triggering PHP function redeclaration errors
2. LiteSpeed LSPHP bytecode cache serving corrupted compiled PHP code from previous crash states
3. Database bloat from 22,073 stuck scheduled tasks and 81,000+ orphaned cache entries

WPML is not the root cause. The issue is specifically with the LiteSpeed Cache plugin's integration behavior and the server's aggressive bytecode caching.

If you'd like to apply these fixes to your production environment, please make sure to take a full backup of both your site files and database before making any updates. I can guide you through the process step by step once you're ready.

I hope this clarifies everything. If you have any questions or need me to explain anything further, please don't hesitate to ask. I'm here to help!

Best regards,
Prosenjit

Gennaio 28, 2026 alle 10:42 am #17770080

jemalG

Hi Prosenjit,

Thank you so much for this incredibly detailed and professional analysis. I am genuinely impressed by the depth of your investigation—you went far beyond standard support to inspect the full stack, database, and server caching.

We truly appreciate you identifying the root causes (LiteSpeed/OPcache corruption and Database bloat) and confirming that WPML is functioning correctly.

We are proceeding immediately to apply these fixes to the production site, exactly as you did on staging:

Security: We will delete the malicious plugin.php file in /wp-content/ immediately.

Database: We will run the SQL queries you provided to clean up the Action Scheduler, orphaned Postmeta, and bloated Transients.

OPcache: We will install the "WP OPcache" plugin to flush the opcode cache and prevent future loops.

We will, of course, take a full backup before touching the production database.

Thank you again for your patience and for finally solving this nightmare of 503 errors.

Best regards,

Gennaio 29, 2026 alle 5:20 am #17772155

Prosenjit Barman
Sostenitore di WPML dal 03/2023

Lingue: Inglese (English )

Fuso orario: Asia/Dhaka (GMT+06:00)

Hi Jemal,

Thank you so much for the kind words — I really appreciate it!

I'm glad the investigation helped identify the root causes. Your plan for applying the fixes looks perfect, and I'm confident these changes will resolve the 503 errors permanently.

Just a small sidenote: since this issue (dual class redeclaration and corrupted compiled PHP code from a previous crash) only happens when the LiteSpeed Cache plugin is active, and affects any plugin that runs background processes, not just WPML, it would be a good idea to also discuss this with the LiteSpeed Cache team. They might be able to share some insights or recommendations that could help.

Please let me know once the fixes are applied to production. I’ll be here if you have any questions, need clarification, or if anything else comes up.

Looking forward to hearing that everything is running smoothly!

Best regards,
Prosenjit