Warnings showing in Front end

A WordPress site showing warnings in Front end helps users maintain WordPress sites.

Warnings in WordPress are used for various purposes. In this case – error statements on WordPress front end help users fix WordPress issues, whereas warnings also help you improve site security.

However – warnings, error statements, and messages on WordPress front end also help bad guys exploit WordPress vulnerabilities.

In this resource – we are going to learn about warnings showing on WordPress front-end. You’ll learn about warnings’ benefits in WordPress and how to turn off error statements in WordPress – if protection from hacking attacks is the purpose.

Introduction: Warnings showing in WordPress Front end

As its name suggests – warnings, error statements, and messages on WordPress front end help us know – what went wrong in WordPress.

For example – if specific plugins fail to handle users’ requests, run a particular operation, or conflict with existing WordPress assets, such as a Theme – WordPress shows errors and warnings on the Front end.

How do WordPress Warnings help Users?

Warnings in WordPress help users track, manage, and fix WordPress issues.

For example – the error establishing a database connection, the error statement That informs users of invalid database credentials in wp-config.php – helps site owners replace credentials with correct values – assisting users quickly solve database connection issues in WordPress.

Similarly – each warning or error statement shows the file path, showing the origin of the culprit asset in WordPress which caused the warning or error statement on WordPress front-end. For example – the following error statement shows the origin of the culprit plugin That caused the problem.

Warning: Undefined array key “sliding” in /home/customer/www/ on line 395

Note: WordPress warnings have harmful effects on WordPress. Keep reading and learn how to deal with WordPress warnings showing on the Front end.

Front end warnings showing in WordPress: Impacts on WordPress websites

Warnings on WordPress front end have different impacts on a WordPress site.

As described above, if warning statements help site owners fix issues, they also open doors for hackers. For example – if a culprit plugin prints tracks for vulnerable components in WordPress, hackers can exploit WordPress sites with warning messages on screen.

In this case – showing profitable, safe, and declarative statements on screen helps users protect sites while getting information at the same time. Also – as a WordPress site owner, you should’ve turned sensitive errors off on the WordPress front-end.

How to Turn off Warnings showing on WordPress Front end?

Now – as you’ve learned how to handle WordPress warnings, error statements, and messages on the screen, let’s know how to turn off WordPress warnings.

Before you perform the required manures, remember that you’ll need the following measures to proceed.

  • Access to the Hosting cPanel -> File Manager (Root directory)
  • Locating, editing, and saving the wp-config.php file in the Root directory

Without further ado, let’s start learning how to make the required changes to stop showing front-end error messages in WordPress.

STEP 1 – Log into Hosting cPanel

Logging into Hosting cPanel is easy with a company’s Web Portal, such as Namecheap. Once logged in, you can browse to enter the Public_HTML directory.

You can also log into Hosting cPanel using an FTP client, such as File Zilla. In this case – you should have created an FTP account in the Hosting cPanel.

In the Public_HTML directory, you can quickly locate the wp-config.php file – the file for WordPress configuration, as its name suggests. See the file, location, and surrounding files in the following screenshot.

Warnings showing in Front end

You can proceed to the next step if you’ve found the wp-config.php file.

STEP 2 – Edit the wp.config.php File

Now – if you’re using File Zilla, as discussed in the step above – you’ll need to download, edit, and re-upload the wp-config.php file.

If you’re using Hosting’s web interface, you’ll need to act in the following manner.

Select the wp-config.php file and click Edit on the options bar above – as shown in the screenshot below.

Warnings showing in Front end

Once clicked, the system shows a confirmation dialogue box, where you can choose the Editing options for cPanel infrastructure. Once completed, click Edit to proceed.

The following page contains the content of the wp-config.php file in a separate window. Here – you can make changes to the content of the file.

STEP 3 – Insert the Code Snippet in wp-config.php File

Once the file is ready for editing, you need to change the following code snippet in the wp-config.php source code.

Set the WP_DEBUG to FALSE in the source code and save changes at the end.

Once you’ve made the change, you should be fine moving forward.

Sometimes – hosting companies don’t allow changes in the wp-config.php or make changes to the WP-DEBUG feature. In such scenarios – you should take another approach to set the necessary measures for warnings in WordPress.

Change the WP_DEBUG value

(2nd method, if a Hosting company doesn’t allow changes by above routine)

Sometimes – specific hosting companies force showing PHP errors for WordPress sites.

In this case – even if you’ve turned off the warnings in WordPress, you can still see what errors, messages, or warnings are being shown on the screen.

In this case – you need to take a different approach to fix warnings showing on WordPress front end.

Replace the define(‘WP_DEBUG’, false); with the following code snippet and save changes at the end.


ini_set(‘error_reporting’, E_ALL );

define(‘WP_DEBUG’, false);

define(‘WP_DEBUG_DISPLAY’, false);

Note: If you don’t know what you’re doing, editing the wp-config.php file may damage WordPress components. Better – if you consult WordPress Support professionals for assistance or let your Hosting support representatives know such scenarios.

Over to You

WordPress warnings, error statements, and messages don’t stop WordPress sites from loading, as happens in other scenarios, such as an error establishing a database connection.

However – such errors can open doors for attackers, helping them see revealed versions of vulnerable assets in WordPress. Then, hackers can craft payloads for weak points in a WordPress site – allowing them take control of vulnerable areas.

If you don’t prefer changing the wp-config.php yourself, you can consult our support channel for assistance. In this case – you can ask for a one-time support plan, monthly package, or live session to fix, make changes, and maintain your WordPress infrastructure.

Leave a Reply

Comment policy: We value comments and the time that visitors to our blog spend to give feedback. Please note that all comments are manually moderated and any deemed to be spam or promotional will be deleted.