If you are editing a WordPress website with Elementor and receive a Server Error (500) when you click Publish or Update, one possible cause is a large number of old WordPress revisions.
This can happen when a page has been edited and saved many times. WordPress may keep a revision each time you save, and Elementor can also store additional information with those revisions.
Common Symptoms
You may notice that:
- Elementor sometimes publishes changes normally and sometimes gives a Server Error 500.
- One page saves correctly while another page fails.
- The problem happens more often on pages you edit frequently.
- Your website itself continues to work even though Elementor cannot save a change.
- The WordPress database has an unusually large number of revisions.
A 500 Server Error means something went wrong with your code while the server was processing the request.
Why Can WordPress Revisions Cause This?
WordPress has a revision system that automatically saves older versions of your posts and pages.
This is useful because it allows you to restore an older version if you make a mistake. However, a page that is edited frequently can build up many revisions over time.
Elementor pages can contain much more data than a basic WordPress page. Each revision may also have related information stored in the WordPress database.
Over time, this can cause the WordPress wp_posts and wp_postmeta tables to become much larger than expected.
If Elementor begins giving Server Error 500 messages while publishing heavily edited pages, cleaning up old revisions is one troubleshooting step you can try.
Back Up Your Website First
Before cleaning your WordPress database, make sure you have a current backup of your website and database.
Database cleanup permanently removes information. Once old revisions are deleted, you will no longer be able to restore those versions of your pages.
Option 1: Clean Old Revisions With WP-Sweep
One of the easiest ways to remove old revisions is with the WP-Sweep plugin.
From your WordPress dashboard, go to:
Plugins → Add New Plugin
Search for:
WP-Sweep
Install and activate the plugin.
Open WP-Sweep and look for the option to clean Revisions.
We recommend starting with revisions rather than selecting every cleanup option available. Some options can remove other WordPress data that you may still need.
After cleaning the revisions, return to Elementor and try publishing your page again.
Option 2: Manually Remove WordPress Revisions Using phpMyAdmin in Plesk
DataPacket customers can also remove old WordPress revisions directly from the database using phpMyAdmin.
Always create a database backup before running SQL commands.
Log in to your Plesk control panel and go to:
Databases → phpMyAdmin
Open the database used by your WordPress website.
WordPress normally uses tables named:
wp_posts
and:
wp_postmeta
Your website may use a different prefix instead of wp_. For example, your tables could be named abc_posts and abc_postmeta.
Use the actual table names shown in your database.
Check How Many Revisions You Have
Select the SQL tab in phpMyAdmin and run:
SELECT COUNT(*) AS total_revisionsFROM wp_postsWHERE post_type = 'revision';
If your WordPress installation uses a different table prefix, replace wp_posts with your actual posts table.
This command only counts the revisions. It does not delete anything.
Delete the Related Revision Metadata
Before deleting the revisions themselves, remove the wp_postmeta records that belong to those revisions.
Run:
DELETE pmFROM wp_postmeta pmINNER JOIN wp_posts p ON pm.post_id = p.IDWHERE p.post_type = 'revision';
Again, replace wp_postmeta and wp_posts if your WordPress database uses a different prefix.
This removes metadata belonging specifically to WordPress revisions.
Delete the Old Revisions
Next, run:
DELETE FROM wp_postsWHERE post_type = 'revision';
This removes all existing WordPress revisions.
It does not delete your currently published posts or pages because the command only targets records where the post_type is revision.
Optimize the Tables
After removing a large number of revisions, you can optimize the affected tables.
In phpMyAdmin, select your wp_posts and wp_postmeta tables.
At the bottom of the table list, select:
With selected → Optimize table
This allows MySQL or MariaDB to clean up the tables after the old data has been removed and may reduce the amount of disk space being used.
A Large Number of Post Meta Records Can Be Normal
Do not be alarmed if phpMyAdmin or WP-Sweep shows hundreds or thousands of records in the wp_postmeta table.
This does not mean your website has that many posts.
Post meta is additional information attached to your existing posts and pages. Elementor and other WordPress plugins can store a large amount of information there.
For this reason, do not empty or delete the entire wp_postmeta table. Doing so can seriously damage your WordPress website.
The SQL commands above specifically remove post meta belonging to revisions.
Limit How Many Revisions WordPress Keeps
If you frequently edit your website, you can prevent revisions from building up again by limiting how many WordPress keeps.
Open your site's wp-config.php file and add:
define( 'WP_POST_REVISIONS', 10 );
This tells WordPress to keep up to 10 revisions for each post or page.
The line should be added before:
/* That's all, stop editing! Happy publishing. */
You can change 10 to another number if you would like WordPress to keep more or fewer revisions.
Check Your PHP Version
If cleaning old revisions does not solve the problem, check the PHP version being used by your website.
Elementor, Elementor Pro, your WordPress theme, and other plugins need to be compatible with the PHP version selected for your domain.
DataPacket customers can check or change their PHP version through:
Plesk → Websites & Domains → PHP Settings
If the problem started after changing PHP versions, try a PHP version supported by your current version of Elementor and your other plugins.
Still Getting a Server Error 500?
If Elementor continues to show a Server Error 500 when publishing, contact DataPacket Support.
Please include the affected domain, the page you are editing, and a screenshot of the exact error if possible.
A Server Error 500 can have several causes. Checking the server error logs at the time the problem happens can help determine whether the error is coming from Elementor, another WordPress plugin, PHP, or another part of the website.