Contact Form 7

Error with Contact Form 7

You may have this kind of error with Contact Form 7 :

PHP Fatal error: Call to a member function get_status() on null in /wp-content/plugins/contact-form-7/includes/contact-form.php on line 721

Or :

PHP Fatal error: Uncaught Error: Call to undefined function plugin_basename() in /wp-content/plugins/contact-form-7/wp-contact-form-7.php:19
Stack trace:\n#0 {main}\n thrown in /wp-content/plugins/contact-form-7/wp-contact-form-7.php on line 19

Or :

Warning: main(/wp-content/plugins/contact-form-7/includes/functions.php) [function.main]: failed to open stream: No such file or directory in /wp-content/plugins/contact-form-7/wp-contact-form-7.php on line 121

Or :

Fatal error: main() [function.require]: Failed opening required ‘/wp-content/plugins/contact-form-7/includes/functions.php’ (include_path=’.:/usr/local/lib/php’) in /wp-content/plugins/contact-form-7/wp-contact-form-7.php on line 121

Or :

Fatal error: Call to undefined function wpcf7_add_shortcode() in /wp-content/plugins/rich-text-editor-field-for-contact-form-7/classes/class-cf7rt-rich-text-editor.php on line 28

Or :

Warning: require_once(/wp-content/plugins/contact-form-7/includes/functions.php): failed to open stream: No such file or directory in /wp-content/plugins/contact-form-7/settings.php on line 3
Fatal error: require_once(): Failed opening required ‘/wp-content/plugins/contact-form-7/includes/functions.php’ (include_path=’.:/opt/php54/lib/php’) in /wp-content/plugins/contact-form-7/settings.php on line 3

Or :

Warning: require_once(includes/utility/plugin-base.php): failed to open stream: No such file or directory in /wp-content/plugins/cornerstone/cornerstone.php on line 17
Fatal error: require_once(): Failed opening required ‘includes/utility/plugin-base.php’ (include_path=’.:/opt/php54/lib/php’) in /wp-content/plugins/cornerstone/cornerstone.php on line 17

Or :

Fatal error: Call to undefined function get_rest_url() in /wp-content/plugins/contact-form-7/admin/admin.php on line 304

Or :

Fatal error: Uncaught Error: Class 'WPCF7_FormTag' not found in /wp-content/plugins/contact-form-7-multi-step-module/form-tags/module-multistep.php:58 Stack trace: #0 /wp-content/plugins/contact-form-7/includes/shortcodes.php(174): cf7msm_multistep_shortcode_handler(Array) #1 [internal function]: WPCF7_ShortcodeManager->do_shortcode_tag(Array) #2 /wp-content/plugins/contact-form-7/includes/shortcodes.php(94): preg_replace_callback('/(\\[?)\\[(respon...', Array, '
form_do_shortcode() #5 /wp-content/plugins/contact-form-7/includes/contact-form.php(342): WPCF7_ContactForm->form_elements() #6 in /wp-content/plugins/contact-form-7-multi-step-module/form-tags/module-multistep.php on line 58

Or :

Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wpml-string-translation/classes/page-builders/class-wpml-pb-update-translated-posts-from-original.php on line 23

There are multiple solutions to try to make it work.


The first thing to do if you are stuck with Contact Form 7 is to ensure that all your WordPress is up to date. You should check your :

  • WordPress
  • Plugins
  • Theme

Once all these updates are done, check back if these errors appear.

Check Contact Form 7

Sometimes, you just need to disable the plugin, and enable it just after to make it work again.

If it doesn’t work, your Contact Form 7 plugin may be corrupted. To ensure that it’s not your case, you have to re-download the plugin (or the theme delivered with the plugin) and try to install it again.

Check others plugins

Are you sure that the error is related to Contact Form 7? Maybe not.

It could be related to another plugin that is not compatible. It could happen when you use a cache plugin, a security plugin, or simply a poorly developed plugin.

Disable all plugins. Then, check for your error, if the error is still there, the problem is not related to plugins compatibility. If there are no more errors, then enable every plugin one by one and check for the error. The goal is to target the plugin involved.

Try another theme

The error can be a problem with your theme.

If it’s not already done, then you should install & activate the default WordPress theme like Twenty Twenty-Two. Check for the error, and see what is happening to be sure that your WordPress theme is not the cause.

Permalinks & htaccess

If it doesn’t work, you may have a problem with your WordPress permalinks and/or your htaccess file. You should go on your WordPress dashboard, and re-saving permalinks from the permalinks page.

Contact the developer

If all these solutions don’t work, we advise you to contact the plugin developer.

You may have found a new bug, or a specific issue. You should get in touch with the developer either on the WordPress plugin forum, either by mail, either on their specific website with their own support.

Alternative solutions

If the developer doesn’t reply, or your problem is very urgent, then you should try an alternative to the plugin.

There are thousands of plugins on the official directory, and many others outside. You should try to find and test them!

If the issue is very specific, and the plugin could not be replaced, we advise you to contact an expert.
This is the best way to ensure you're not going to break your site anymore.