Skip to main content
When editing email templates in MainWP (such as Uptime Monitoring notifications), changes may not save and content resets after refreshing the page. This is typically caused by a WordPress security setting.

What You’ll Learn

  • Why email template changes don’t save
  • How to check if file editing is disabled
  • How to enable template editing

Prerequisites

  • Admin access to your Dashboard site
  • FTP or file manager access to edit wp-config.php

Why This Happens

WordPress includes a security constant that prevents editing theme and plugin files through the admin interface. When enabled, this setting also blocks MainWP from saving email template changes. The constant in wp-config.php:
define('DISALLOW_FILE_EDIT', true);
This setting is often added by:
  • Security plugins
  • Managed WordPress hosts
  • Security-conscious server administrators

Check if File Editing is Disabled

You can determine if this setting is enabled by looking for these options in your Dashboard site’s WP Admin:
Menu LocationIf VisibleIf Missing
Plugins > Plugin File EditorFile editing enabledFile editing disabled
Appearance > Theme File EditorFile editing enabledFile editing disabled
If both menu items are missing, DISALLOW_FILE_EDIT is set to true.

Enable Email Template Editing

1

Access wp-config.php

Connect to your Dashboard site via FTP or your hosting file manager and open wp-config.php.
2

Find the constant

Search for this line:
define('DISALLOW_FILE_EDIT', true);
3

Modify or remove

Either remove the line completely, or change true to false:
define('DISALLOW_FILE_EDIT', false);
4

Save the file

Save wp-config.php and upload it back to your server.
5

Test template editing

Return to your MainWP Dashboard and try editing an email template. Changes should now save successfully.

Security Considerations

The DISALLOW_FILE_EDIT constant exists for security reasons—it prevents attackers who gain admin access from modifying code through the WordPress interface.

Alternative Approaches

If you prefer to keep file editing disabled for security:
OptionDescription
Edit via FTPModify template files directly on the server
Temporarily enableEnable only when editing templates, then disable again
Use child themeOverride templates via a child theme

Self-Check Checklist

  • Checked for Plugin/Theme File Editor in WP Admin menus
  • Located DISALLOW_FILE_EDIT in wp-config.php
  • Modified or removed the constant
  • Email template changes now save successfully