Blank Pages in OpenCart: Most Common Causes

After upgrading or modifying your OpenCart installation, you may encounter a blank screen either in front office or in the administration area.

There are various causes for this issue in OpenCart. Here I’ll describe 3 of the most common ones and how to fix them.

1. PHP errors not being displayed

Hidden PHP errors is one of the most common issue for blank pages in OpenCart.

Production values for display_errors and log_errors PHP directives are Off and On respectively. With such a configuration, some PHP errors will make OpenCart display a blank page with no clue as to what the actual cause of it is and log the errors instead.

To find out the actual error, you’ll need to check your server’s (or PHP) error log for PHP errors. A generic syntax error will look somewhat like this:

[Sun Feb 26 12:48:37 2012] [error] [client] PHP Parse error: syntax error, unexpected ‘}’ in /srv/www/dev/opencart/1513/index.php on line 47

Now when you know what the actual error is, you should be able to fix it yourself or find someone to do it for you.

2. Wrong variable values in configuration files

Broken configuration files can cause blank pages in OpenCart as well. If you are getting a blank page and no errors in the log, be sure to double check the config.php and admin/config.php files, paying special attention to DIR_ variables. If your DIR_APPLICATION is not correctly pointing to the catalog/ subfolder, you’ll get a blank page and no errors.

Same applies to DIR_APPLICATION variable within your back office config.php file. It should point to your admin folder or you will get an empty page when trying to access the administration area of your store.

3. Broken directory structure

Although this is a less common cause of blank pages in OpenCart, it is still worth mentioning.

Both back office and front office folders follow the same structure in OpenCart:

You will get a blank page with no errors if this structure is missing the controller/ folder. For other missing folders OpenCart will usually display an error, so if you aren’t getting any errors, make sure your controller/ folder is intact.

Feel free to post a comment if you think there’s something else that should be on the list.

Martin Boze

Founder and Lead Everything at MultiMerch Marketplace.
Share on Facebook0Tweet about this on Twitter1Share on LinkedIn0Share on Google+0Share on Reddit0Share on StumbleUpon0
  • Tarang

    Thank you for the valued information.

    My website was migrated from 1 server to another recently and i have shifted the code and DB from old server to the new one. It was hosted on windows server initially and nw i have switched to linux.

    I checked for these 2 errors / issues you mentioned above, with my install.
    But config files and folder structure is correct.

    I have re-installed opencart and uploaded old db and files which i have modified. I am using a custom theme.

    Can you please tell me what else can cause this issue? Can this be a database issue?

    • Martin Boze

      It shouldn’t be caused by the database directly. If your configuration and directory structure are correct then it’s probably errors not being displayed. I can’t think of any other cause of this.

  • Mohsin Rafiq


    I was using a linux server when creating opencart site, now customer purchases a windows based hosting. It is problematic for me now. I am seeing blank page although the URL redirects towards login.

    Please tell me where can i be wrong? I have changed directories paths but no all in vain….

    • Martin Boze

      Have you solved your issue? If everything else fails, you have to go for low-level debugging, line by line.

  • Annie


    I have been battling this blank page issue for days. I’m trying to install OC on Mamp Pro. Joomla, Magento and WP install without issue so I feel confident this is not a Mamp, phpmyadmin or MySql error.

    This is what the error log says: [17-Jul-2012 00:06:33 UTC] PHP Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘-store WHERE REPLACE(url, ‘www.’, ”) = ‘” at line 1Error No: 1064SELECT * FROM sec-store WHERE REPLACE(url, ‘www.’, ”) = ‘http://xxx/’ in /Applications/MAMP/htdocs/secrets/system/database/mysql.php on line 49.

    I am just a designer, not a programmer or even very good with code. I am at a total loss to know what to do with this. I cannot find anyone who can help. No-one on the OC Forum bothers to respond.

    Do you have any idea where I can find a php person who can help???

    • Martin Boze

      Does it happen during installation? It looks like some MySQL issue specific to your store. We might be able to debug and fix it if you mail us more details.

  • Miranda


    I moved my website from one domain to another en now i get a blank page. I checked the config.php but everything seems fine. The link to the administration area is working. What did i do wrong?

    • Martin Boze

      If you’re totally sure your new configuration is correct, you’ll need to check your server logs for errors.

  • Adem

    Hi everyone, after 2 weeks of frustration and determination not to go through a whole new install again I think I have a solution, how general it will be I am not sure but it certainly has worked for me.

    I noticed a problem from the start with my “Cart” on homepage not loading and after some searching I discovered this was a problem with the way I installed Opencart on my site, without the “www” so I done a search on google for “opencart cart not updating on homepage” and found a thread that pointed me in the right direction, by simply adding rules to make the site redirect from to

    I also noticed that for some strange reason, possibly the Notepad I used but the start of the “config.php” in the root folder had a “space” before the syntax of <?php so I deleted this, also the same for the "config.php" in my admin folder.

    Everything is fully working now and have fixed my issue. I just had to say something as I know how frustrating this is.

    All the best

  • Pingback: How to Upgrade directly from 1.5.1 to ? | Open Cart Know How()

  • umair

    Although i am new in opencart . I also face this problem so Sometime blank pages in opencart due to vqmod. Usually it is session error. You need to install a new fresh copy of VqMod whenever change your server. also replace old index file with newly downloaded (Uninstalled) copy of opencart. For more help and share your knowledge contact me.

    • Ajayi Oluwaseun Emmanuel

      This problem has to do with vqmod as suggested. this worked for me.
      but in my case, i simply uninstalled an unused vqmod script and that was it.

  • Rachana Dhabalia

    This page has the most useful information on Opencart errors that I could find anywhere. I have actually referred this page to my hosting company to try & resolve the issues. I am surely going to bookmark this on and will surely share this with all my friends.

  • almond oil

    The almond tree is a native tree originating from Asia and the Middle East.
    The oil is chock full of nutrients which help overall health, in addition to that of the hair.
    Sometimes these patches tend to get itchy, and of course
    there’s the temptation to scratch, but this only makes the problem worse and increases the chance of infection.

  • Carl

    Well, consider the following : an off site upgrade from to, had a blank front page, yet admin worked. Turns out the server need php-mcrypt, after installing that, problem solved. It would be an idea to integrate that as a factor in your article, possibly php functionality.

  • Jeremy

    I currently have a blank page problem in the plugin I’m developing. I’ve already checked all of the causes described on this page and it’s not any of them. After I call $this->render(), the contents of $this->output will be the page I’m trying to create but it never appears on the browser.

    • affect

      You need to output the response in some way. By default, it’s $this->response->setOutput($this->render()). Alternatively, you could pass it via AJAX (if it’s a dialog you’re building, or something).

  • Diego Medina

    One more reason.

    1- It start by seeing an error that the image.php script failed to allocate memory …. Something like:

    Fatal error: Allowed memory size of 31457280 bytes exhausted (tried to allocate 10000 bytes) in …public_html/system/library/image.php on line 73

    So you may go ahead and increase the memory that each php script can use.
    Then you get a blank page with no response body (it is a request that end up aborted)

    2- The solution in my case was to go into the Admin panel -> Image and change the biggest size from 10000 x 10000 to 1000 x 1000

    Thanks for this page!

  • Christian

    I just solved another issue with a white screen, which was related to Suhosin blocking PHP execution:
    After moving my OpenCart project from my Ubuntu dev notebook to our Debian web server, it showed a blank screen.
    However, a new OpenCart installation worked on that web server.
    Found the reason hours later: the Suhosin extension in PHP, which blocked part of the vqmod execution, was causing this. The error message was in the system error log, not in the web server’s log.
    No idea why vqmod did not work with Suhosin. Disabling Suhosin for that virtual server solved it finally.

  • Zühtü

    I installed Opencart to a linux server couple of months ago. It was idle. Now I’ve started to put some products, installed a theme and SSL to do some tests. Everything was ok since two days before. The site suddenly gives plank page. Some of the error_log reads as follows: (H E L P !)

    [Fri Jul 04 06:43:41 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 06:59:25 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 07:43:51 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 08:07:53 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 08:44:01 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 08:45:23 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 08:45:46 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 08:45:46 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 09:06:24 2014] [error] [client] File does not exist: /vhosts/, referer:
    [Fri Jul 04 09:44:11 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 10:44:21 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 10:44:38 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 11:12:13 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 11:12:13 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 11:40:58 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 11:44:31 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 11:46:33 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 12:06:49 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 12:06:49 2014] [error] [client] File does not exist: /vhosts/
    [Fri Jul 04 12:44:41 2014] [error] [client] File does not exist: /vhosts/

  • Claudie Larouche

    Do you have any ideas where I could find the server’s PHP error log file?

    • Martin Boze

      Those are usually located inside the logs/ folder that is outside of your public_html/ directory.