Occasionally, when working with any program, you may encounter an error. We recently ran across a customer account with an error in their OpenCart site. This error occurs due to a missing file named maintenance.php and disrupted the site display when placed in maintenance mode. The error appears when the display error option is enabled, as "Error: Could not load language common/maintenance!". Follow along below as we explain how to correct this error for your OpenCart site.
"Error: Could not load language common/maintenance!" in OpenCart 1.5
- First, log into your cPanel.
- Now that you are in the main cPanel screen, look the File Manager tool and open it.
- Next find your OpenCart program's root folder and navigate to it. Most websites use their OpenCart site as the main domain. In this case the root folder will be the public_html. If you are using a subfolder, however, (example.com/store) you would need to enter that specific folder (public_html/store).
- Once you are in the root folder, you need to find the folder where that is missing the maintenance.php file so you can add a new one. This is located under the catalog/language/english/common folder. (This assumes you are using English as your site's languge. If you are using another language, replace the english folder with the folder for your chosen language.)
- Now that you are in the common folder, you should notice there is no maintenance.php file. From here, you will create a new one. To do so, simply click on the New File button from the top toolbar.
- Be sure to name your new file maintenance.php and click on the Create New File button. This creates an empty file, which you can now work with.
- The file list will refresh and you will see the file listed in the folder along with the header.php and footer.php files. Highlight the maintenance.php file and open it so you can edit the content.
- Once in the file editor, copy and paste the following code in it to create an OpenCart default maintenance page.
<?php
// Heading
$_['heading_title'] = 'Maintenance'; // Text
$_['text_maintenance'] = 'Maintenance';
$_['text_message'] = '<h1 style="text-align:center;">
We are currently performing some scheduled maintenance. <br/>
We will be back as soon as possible. Please check back soon.</h1>';
?>
- Once completed, click the Save Changes button in the upper right to save it. Your maintenance mode should now appear normally and no longer blank or with an error message.
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!