We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Debugging For Beginners | Forum

dave Leader
dave Aug 30 '18

Hello all, 

I am writing this in the hopes of getting you started on how to debug your own website and also because i would rather just link this topic than to have to retype this every time someone asks me.   :) 

Site Modes:

You have two modes you can put the site into.. debug mode or dev mode (development mode)  you cannot have them both active at the same time, one or the other. 

Here is mine i have customized it a bit with duplication to prevent typos. I already have one set to true and one false. So all i have to do is move the slashes from one to the other and that keeps me from making a coding error and missing something causing a site crash.   The slashes are used to comment out the line so it does not execute.

Yours will just have the two. So if you want to just change the text from true to false you can, i didnt want to do that. 

They are in your ow_includes/config.php file  at the bottom you will see them.


* Make changes in this block if you want to enable DEV mode and DEBUG mode    

     define('OW_DEBUG_MODE', false);

    //define('OW_DEBUG_MODE', true);

    define('OW_DEV_MODE', false);

    //define('OW_DEV_MODE', true);

dev mode is used if you change css or html files to see the changes but it makes the site really slow.  If you have dev mode set to true then if you make a change then press control+f5 and it will refresh the page.   There is a free plugin in the store called extreme cache that still works but the developer is gone. I use it and it means that i dont have to mess with the config file because the plugin will clear the cache when you run it. So with the plugin you can leave the config for dev mode set to false and just run the plugin. 

Now debug mode is just that, it shows errors and warnings on the page itself when the site runs. This one youll have to do manually in the config file, just remember to turn it off (false) when you are done.

Log Files:

You will have basically two places to look for log files.  The server will create a error_log file in public html if there is a server error or warning or notice.  Oxwall also has a folder called ow_log which has an error.log file and also could have a cron_error.log file as well if there have been cron errors. 

The errors in these files are listed with the most recent error on the bottom.  You will need to keep these logs clean.  I have seen some of them as big as 1GB and with that size (you will have issues scrolling to the bottom of the file)  the best thing to do is to just delete the file and either create a new file or let the system create one for you. 

You dont have to clean them every week but i would at least clean them every 14 days or check them often to see if they have entries in them.  If you see a "[notice]" in the file it is not a fatal error, its just telling you that something needs to be addressed.  

Without trying to teach you professional debugging techniques, you can just look in those errors for a plugin name and if you see one then go deactivate that plugin and see if your issue goes away.  Some of the errors are more complicated than that and if so then ask on the forum. 


Now you also have the console, each browser has what they call a console. When you right click on a page have you ever seen the option to inspect element. Well that brings up the console and there are several ways to bring that up, the other way is in your browser options usually under a development tools option.  

The console is used to check out the user side (your side) of the process, and it will show you all kinds of other stuff but there are videos on youtube you can watch to learn more.  Basically in console mode (check the nav bar at the top of the window) you can see such things as javascript errors, css styling and such.  This is another good way to see if a plugin has issues, if so the disable the plugin. 

In closing:

If your site is a white page (with nothing on it, no text at all) it probably means that you have a coding typo somewhere. So for example if this happens right after you changed your config file, then go back and check your change because more than likely you did something wrong in the code. 

This is all very basic stuff but every website owner needs to know this stuff if they are going to be any good at all at running a website.  This was intented to just touch on some of the ways to debug things yourself or have the information ready for those in support so you can tell them what you found because they will ask you. 

This will give you a beginners running start at debugging your own site and i hope it helps you.  

Dave :)

The Forum post is edited by dave Aug 30 '18
Dale Fletcher
Dale Fletcher Aug 30 '18
Oh my gosh Dave! Thank you so much! I want to thank you for all of your help you are super awsome! Teaching me so much so quick!
This topic is sticky
This topic is locked