1. Home
  2. Docs
  4. How to analyze error logs in WPScale

How to analyze error logs in WPScale

When your site no longer displays correctly or not at all, the problem often comes from a plugin/theme or error in a piece of code you added.

Generally, when this is the case, you see an error 502 on your site.

In such cases, there’s only one solution to understand and correct the problem: analyzing error logs.

At WPScale, you need to go to your WPScale console, click on the blue button to manage your WordPress and go to the "WordPress" tab:

So you have 3 blue buttons - you can either display the errors directly in your browser or download the error logs to your computer.

Be careful: this button is only displayed if you have errors registered for your site !  

Now that you have this file on your computer, open it with your favourite text editor - it can simply be the notepad, Notepad++, Sublime Text, Visual Code, Bracket or whatever - and you should see lines of code.

These are in fact error lines or warnings recorded on your site. In general, you should watch out for the last lines with the words "Fatal Error" like the following:

[12-Jan-2018 15:05:12 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/clients/client/prod/wp/wp-content/plugins/wp-links-page-pro-developer/includes/csv-export.php:16 Stack trace: #0 {main} thrown in /home/clients/client/prod/wp/wp-content/plugins/wp-links-page-pro-developer/includes/csv-export.php on line 16

On this error line, you can see that a plugin name is quoted: WP Links Page Pro Developer.

In our case, the error "Call to undefined function mysql_connect()" indicates that the plugin calls a "mysql_connect()" function that’s not been defined, but the most important thing is to know which plugin is involved.

You can now log in to your WordPress via FTP in order to deactivate the plugin which is blocking the display of your site.

To connect via FTP, you can follow this article: https://www.wpscale.com/docs/console-wpscale/managing-your-ftp/ .

Once connected via FTP, go to the plugins folder (/wp-content/plugins/), and delete or rename the plugin folder concerned (adding for example ".disabled" at the end of the name).

Reload your page now and you should see your site appear :)

Was this article helpful to you? Yes No