If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

OpenCart 1.5.x Troubleshooter. How to get rid of the ‘Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future’ message

With this tutorial you will learn how to deal with ‘Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future’ error after Opencart 1.5.x theme installation.

OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys

We strongly recommend that you backup the files before editing!

In order to resolve this issue you need to change three things:

  1. Download this archive.

  2. Find the config.php file, located in the root directory of your OpenCart installation.

  3. Find the config.php file, located in the admin folder.

If you have the built-in code editor on your cPanel, feel free to use it.

  1. After you have downloaded archive mentioned in the first step you need to extract the files from it. You can check these links to learn how to do it for Windows and Mac. After you have done so, please, upload all the content of the Uploads folder to your OpenCart root folder.

  2. Now, when the files has been transferred, you need to go to your cPanel/FTP and locate the config.php file. Download it to your computer and edit it with any code editor convenient (Notepad++, Sublime, Adobe Dreamweaver).

    Locate the approximately 21st line define(‘DB_DRIVER’, ‘mysql’); and change it to the following: define(‘DB_DRIVER’, ‘mysqliz’);. Save the changes and upload it back to the root directory, make sure to overwrite the existing config.php file.

  3. Then you will need to perform same procedure in the config.php file in the admin folder. Please, go to admin folder and download config.php file. Open it with the same code editor you edited the previous file and locate approximately 24th define(‘DB_DRIVER’, ‘mysql’);. Then change it so it looks like this: define(‘DB_DRIVER’, ‘mysqliz’);. Save the changes and upload the file to the admin folder and make sure the existing file is replaced.

  4. After the file modifications are completed, please, clear the browsers cache. You will see that your site is working properly now.

    Feel free to check the detailed video tutorial below:

    OpenCart 1.5.x Troubleshooter. How to get rid of the ‘Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future’ message

    Also, take a look at the collection of our premium OpenCart templates.