How to change Default PHP and MySQL Version in webuzo control panel

webuzo control panel

To change the default PHP and MySQL versions in the Webuzo Control Panel, follow these steps:

1. Change the Default PHP Version

  1. Log in to Webuzo Admin Panel:
    • Open your browser and go to your webuzo control panel Admin Panel at http://your-server-ip:2004 or https://your-domain.com:2004.
    • Enter your admin credentials to log in.
  2. Navigate to PHP Settings:
    • In the Webuzo Admin Panel, go to the “Server Configuration” section.
    • Under “PHP Configuration”, click on “PHP Versions”.
  3. Select the PHP Version:
    • You will see a list of available PHP versions on your server. Choose the PHP version you want to set as the default.
    • Click on the “Set as Default” button next to the desired PHP version.
  4. Verify the Change:
    • After selecting the new default PHP version, you can verify the change by checking your PHP configuration or running a simple PHP info script.

2. Change the Default MySQL Version in webuzo control panel

  1. Log in to Webuzo Admin Panel:
    • As with PHP, log in to the Webuzo Admin Panel at http://your-server-ip:2004 or https://your-domain.com:2004.
  2. Navigate to MySQL Settings:
    • Go to the “Databases” section in the Webuzo Admin Panel.
    • Under “MySQL Database”, click on “MySQL Versions”.
  3. Select the MySQL Version:
    • webuzo control panel will list the available MySQL versions on your server.
    • Choose the version you want to set as the default and click “Set as Default”.
  4. Restart MySQL (if necessary):
    • In some cases, the MySQL service may need to be restarted to apply the changes. You can do this via the webuzo control panel admin interface or by running the following command in SSH:bashCopy codesudo service mysql restart
  5. Verify the Change:
    • You can verify that the new MySQL version is active by logging into MySQL and checking the version:bashCopy codemysql -u root -p mysql> SELECT VERSION();

3. Additional Notes

  • Changing PHP Versions for Websites: If you need to set a different PHP version for a specific website, you can do so by navigating to “Web Hosting” and selecting the domain or website. Then, you can configure the PHP version for that site individually.
  • Multiple PHP Versions: webuzo control panel allows you to run multiple PHP versions on the same server, so you can switch between versions as needed for different websites or applications.

By following these steps, you can easily manage and change the default PHP and MySQL versions in webuzo control panel.

Common Troubleshooting Tips:

1. PHP Version Not Updating:

  • Clear Caches: Clear your browser cache and try logging in again. Sometimes cached data can show an outdated version.
  • Check for .htaccess Overrides: If you are using Apache and have a .htaccess file, it may contain PHP version overrides. Ensure that there are no conflicting settings for PHP.
    • Example: You might see lines like this in .htaccess:bashCopy codeAddHandler application/x-httpd-php72 .php Change the version number to match the version you want.

2. MySQL Version Not Changing:

  • MySQL/MariaDB Service Restart: Ensure the MySQL service has restarted after you set the default version.
  • Check for Multiple MySQL Instances: If you have multiple MySQL instances installed (e.g., MariaDB and MySQL), confirm that the correct one is being used. You might need to stop the older version to avoid conflicts.

3. webuzo control panel Is Not Showing the Desired PHP/MySQL Version:

  • Install Missing Versions:
    • You might need to manually install the PHP or MySQL version via Webuzo’s Software Installer if it’s not available.
    • For PHP, Webuzo typically offers multiple versions through the PHP Selector tool.
    • For MySQL, Webuzo allows installation of both MySQL and MariaDB. You can select the version from there.

4. Error After Switching PHP or MySQL Versions:

  • Backup First: Always take backups of your data and websites before making any changes.
  • Error Logs: Check the PHP and MySQL error logs for clues if your website or application isn’t functioning after the switch.
    • PHP logs can typically be found in /var/log/php-fpm.log or /var/log/apache2/error_log.
    • MySQL logs are often located in /var/log/mysql/ or /var/lib/mysql/.

Backup and Restore Considerations:

Before making any significant changes like upgrading PHP or MySQL versions, it’s recommended to take full backups of:

  • All databases (via the Database Backup section in Webuzo or using mysqldump).
  • Your website files (via Webuzo’s File Manager or SSH/FTP).

You can use Webuzo’s built-in backup tools or a manual method via command line.


Conclusion:

Changing the default PHP and MySQL versions in Webuzo is fairly straightforward through the control panel interface. By following the steps above, you can ensure that your server is running the correct software versions to meet the needs of your websites and applications. Always remember to verify the compatibility of your apps with the selected versions and to take backups before making changes.

Let me know if you run into any issues or need more specific guidance on a particular part of the process!