If you are experiencing issues with Elementor templates not saving, there are a few steps you can take to troubleshoot and resolve the problem. One common cause of this issue is a conflict with other plugins or themes. To identify and resolve conflicts, you can try the following steps:
Disable other plugins: Temporarily deactivate all other plugins except for Elementor and see if the template saving issue persists. If the problem is resolved, you can then reactivate the plugins one by one to identify the conflicting plugin.
Switch to a default theme: Temporarily switch to a default WordPress theme (such as Twenty Twenty-One) and check if the template saving issue still occurs. If the problem is resolved, it indicates a conflict with your theme. You may need to reach out to the theme developer for assistance or consider using a different theme.
Increase PHP memory limit: Insufficient PHP memory can sometimes cause issues with saving Elementor templates. You can try increasing the PHP memory limit by adding the following code to your wp-config.php file, just before the line that says
/* That's all, stop editing! Happy blogging. */:
define( 'WP_MEMORY_LIMIT', '256M' );
This code snippet increases the PHP memory limit to 256MB. If the issue persists, you can try increasing it further or consult with your hosting provider.
- Clear Elementor cache: Elementor has its own cache system, and clearing it can help resolve saving issues. In your WordPress dashboard, go to Elementor > Tools and click on the “Clear Cache” button.
If none of the above steps resolve the template saving issue, you may need to reach out to Elementor support for further assistance. They can provide more specific guidance based on your setup and any error messages you may be encountering.
Please note that the code snippet provided above is for increasing the PHP memory limit and should be added to the wp-config.php file. It sets the memory limit to 256MB, but you can adjust the value as needed.
Examples
Example #1: Troubleshooting Elementor Template Saving Issue
This use case demonstrates how to troubleshoot and resolve the issue of Elementor templates not saving properly.
add_action( 'admin_init', 'wpsnippets_disable_elementor_autosave' );
function wpsnippets_disable_elementor_autosave() {
if ( isset( $_GET['action'] ) && $_GET['action'] === 'elementor' ) {
add_filter( 'wp_doing_ajax', '__return_false' );
}
}
This code example disables the Elementor autosave feature, which can sometimes cause issues with template saving. By hooking into the admin_init action, we check if the current action is related to Elementor. If it is, we add a filter to prevent Elementor from performing autosave during AJAX requests.
Example #2: Increasing PHP Memory Limit for Elementor
In some cases, the Elementor template not saving issue can be caused by insufficient PHP memory limit. Here’s how you can increase the memory limit specifically for Elementor.
add_filter( 'wp_memory_limit', 'wpsnippets_increase_elementor_memory_limit' );
function wpsnippets_increase_elementor_memory_limit( $limit ) {
if ( class_exists( 'ElementorPlugin' ) ) {
return '256M';
}
return $limit;
}
This code example uses the wp_memory_limit filter to increase the PHP memory limit to 256MB when Elementor is active. By checking if the Elementor plugin class exists, we can target only the Elementor-related requests and set a higher memory limit to ensure smooth template saving.
Example #3: Disabling Third-Party Plugins Conflict
Sometimes, conflicts with other plugins can prevent Elementor templates from saving correctly. This example demonstrates how to disable other plugins temporarily to identify the conflicting one.
add_action( 'elementor/editor/before_enqueue_scripts', 'wpsnippets_disable_plugins_for_elementor' );
function wpsnippets_disable_plugins_for_elementor() {
if ( ElementorPlugin::$instance->editor->is_edit_mode() ) {
deactivate_plugins( array( 'plugin1/plugin1.php', 'plugin2/plugin2.php' ) );
}
}
By hooking into the elementor/editor/before_enqueue_scripts action, we can disable specific plugins when Elementor is in edit mode. In this example, we deactivate two plugins (plugin1 and plugin2) using the deactivate_plugins() function. This allows you to identify if any of these plugins are causing conflicts with Elementor’s template saving functionality.
