Can’t save or edit page in OptimizeBuilder

If you are experiencing an issue where you get an “ERROR” when saving the page you are working on, please check these troubleshooting steps –

Step 1: Minimum requirements

  • Ensure you are running PHP 7.0 or higher. OptimizePress 3.0 requires at least PHP 7.0 to function properly.
  • Check that you are running the latest version of WordPress. Updating to the latest version of WordPress is highly recommended. WordPress 5.0 is the absolute minimum.
  • Use the latest OptimizePress 3.0 version
  • Increase your WP Memory Limit – we recommend a minimum of 256mb

Please also check with your hosting company and ensure that your server meets with all the other minimum requirements as provided here –
https://docs.optimizepress.com/article/2020-optimizepress-3-minimum-requirements

Step 2: Check for plugin and theme incompatibilities

Some plugins or theme/s might have a conflict with the OptimizePress 3.0 platform causing this issue. These plugins or theme/s render Styling or JavaScript codes which might break an OptimizePress functionality. Unfortunately we cannot guarantee compatibility with every theme and plugin available for WordPress as there are thousands (over 20,000) of them – we cannot test them all. So we would ask to check your plugins or theme/s if this caused the issue. To do that, please do the following –

If you are not using the SmartTheme, please go to Appearance >> Themes >> then activate any of the default WordPress themes (i.e. Twenty Sixteen, Twenty Seventeen, Twenty Eighteen, Twenty Nineteen), this will deactivate your current theme or the theme you are using in your site. After that, test your issue/s again. If that fixes the issue, your current theme is the cause of the issue/s and is incompatible with OptimizePress 3.0 unfortunately.

To check the plugins, go to Plugins >> disable all plugins except OptimizePress 3.0 plugins. Then check the issue/s. Please note you can reactivate the plugins by going to the Recently Active tab.

Note: We recommend using Chrome or Firefox web browsers when editing your OptimizePress pages, these browsers handle JavaScript best.

Step 3: Increase the max_input_vars of your site

The recommended minimum max_input_vars in the php.ini setting is 3000 – this is usually set to around 1000. If you are having issues in saving the content, please check your max_input_vars is set to the recommended value.

If your max input vars is already set to 3000 and you are still having issues with saving your content, we have heard in few occasions where certain hosts, pages with long content stop rendering or saving content after some point. We found out this is due to a limitation in the PHP setup for the site which is set to only save a certain number of variables on a page. Once the limit is exceeded, content is no longer saved – this is not a setting or limitation within OptimizePress 3.0.

We have found a workaround to solve this issue by increasing the max_input_vars to 10000. You can contact your hosting company and ask them to increase your max input vars.

Or you may do the following (this should only be done once per site and if you are not sure to implement this, it would be better to ask help from your hosting company) –

1. In your  php.ini file you need to change the setting for the max_input_vars variable. You need to change it to be 10000:

max_input_vars = 10000

This should ensure that all variables or content is saved to the database rather than only 1000 variables being passed through.

2. If updating through php.ini file doesn’t work, then you can try creating a .user.ini file in the same directory as your wp-config.php file and add the same variable:

max_input_vars = 10000

IMPORTANT NOTE: Some hosting companies can’t reach 10000 so please ask them their limits beforehand. If they can’t reach 10000, ask them to go for max_input_vars = 9999 instead (see more about this at the bottom of this page).

If you are still having issues after doing these suggested troubleshooting steps, please submit a ticket to our support helpdesk so our Support team can check this issue in your site.

If you are using Sucuri Firewall

If you are using Sucuri Firewall (from https://waf.sucuri.net), on some pages you can experience Error while saving.

To fix that, please whitelist our OP3 REST API routes by following these steps

  1. Login to your Sucuri account
  2. Go to Firewall in top menu
  3. Click on Access Control in submenu
  4. Click on Whitelist URL Paths in the left sidebar
  5. Add the following path in Whitelist URL paths input field (this recently changed to “Allow URL paths”)
    /wp-json/op3/v1/
  6. Select Begins with in the dropdown beside Whitelist URL input field
  7. Click on Whitelist button

If you are using Cloudflare on your site

If you have Cloudflare setup to protect your site, you may have issues with saving your pages in OptimizePress, as their platform can sometimes stop communication between our page builder and your website database.

To fix these issues, you need to add 2 rules inside the configuration settings of your Cloudflare account.

Add Configuration Rules

  1. Login to your Cloudflare account and select the site you are using OptimizePress on (Rules need to be added for each site where you’re using OptimizePress)
  2. On the sidebar, select Rules
  3. Under Rules go to > Configuration Rules
  4. Click the blue button “Create configuration rule”

5. You’ll now need to set a name for your rule. This can be anything you want, we recommend OP Json or something similar

6. Under the section “When incoming requests match…” select URI Path from the “Field” dropdown.

7. For the “Operator” field, select “contains

8. Inside the Value field, add this:

/wp-json/*

This must be added exactly as above to work correctly

9. Scroll to the bottom of the page and save this rule. You should be taken back to the main Configuration rules screen where you should see this rule is switched on.

Add Page Rule for OptimizePress

1. Inside your Cloudflare account, select Rules from the sidebar, and select “Page Rules”

2. You first need to create a new Page Rule – Click the blue button “Create Page Rule”

3. In the URL field, you need to add the following:

https://yourdomain.com/wp-json/*

Ensure you replace “yourdomain.com” with the exact URL of your site, including www if that shows in your top bar when you visit your site.

For our OptimizePress website, this would be https://www.optimizepress.com/wp-json/*

4. In the dropdowns below, we need to add a number of options:

  • Cache Level = Bypass
  • Disable Security
  • Disable Apps
  • Disable Performance

Your options should look something like this:

When you’re happy with everything, click “Save and Deploy Page Rule”

You should now be all set. You may need to clear your Cloudflare cache and wait 1-2 minutes for this to refresh on your site. You should also clear your OptimizePress cache before re-testing your editor saving.

Custom VPS or Dedicated Server MySQL Setting

In very rare cases we have seen a few times where customer who have setup a custom VPS or Dedicated hosting server through their web host may have a low setting on MySQL for max_allowed_packet, or have an undeclared setting for this important value.

We generally see that most shared hosting environments typically have max_allowed_packet size set to 64MB or higher which is more than adequate for saving entries to the database.

If you are concerned this could be the issue, you may first check the size of this by going to your WordPress Admin area, and clicking “Tools” and “Site Health”

From there, click the “info” tab at the top of the screen, and you’ll then see something like this after clicking on “Database”

In the above example, the max_allowed_packet is shown as 268435456 bytes. To get the value in MB (megabytes) you would simply divide this by 1024 which is close to 262MB. In this case, the max_allowed_packet would surely not be the issue.

We would recommend a minimum value for max_allowed_packet to be at least 32MB. A higher value would be recommended in some cases where you have a higher than normal number of elements on a page and you can not save that page while being able to save other smaller pages, while also meeting all other requirements such as max_input_vars = 9999 and sufficient PHP/WP Memory limits.

Godaddy Hosting (Same as Sucuri)

We strongly suggest not using Godaddy as their servers are generally underpowered, overloaded, and generally have quite bad speed scores in most cases. In our own testing we also found a very poor uptime as well with frequent server reboots or short unexplained downtimes.

If you can’t save your page and you are using Godaddy, you should check everything else above in this guide as well. If you check browser console and see a blocked file with red error then you may need to white list our Rest Routes (same as with Cloudflare and Sucuri above).

To whitelist our Rest Routes, you may follow this guide on Godaddy. It’s basically the same as the Sucuri guide above as their security options look as though they have Sucuri built into their system. You’ll need to whitelist the following paths:

/wp-json/op3/v1/

Here is an example of what this will look like:

If you still have issues saving pages while using Godaddy, or other hosting, and nothing in this guide works for you, please reach out to our support team for further assistance.

Updated on August 25, 2023

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
Contact Support