Articles in this section

Backup of a WordPress instance fails in WP Toolkit: "TLS/SSL error: SSL is required, but the server does not support it"

Applicable to:

  • Plesk for Windows

Symptoms

When backing up a WordPress instance in WP Toolkit, the task fails with the message:

PLESK_ERROR: Failed to back up site
Unable to export database. Error message: -- Connecting to localhost... mariadb-dump.exe: Got error: 2026: "TLS/SSL error: SSL is required, but the server does not support it" when trying to connect ...

Cause

DB_HOST directive in domain's wp-config.php file is not properly defined:

  • either MySQL/MariaDB port 3306 is not set
  • or 127.0.0.1 is specified instead of localhost.

Resolution

  1. Log in to Plesk.
  2. Go to Domains > example.com > Dashboard tab > Files.
  3. Click on wp-config.php file to edit.
  4. Change DB_HOST value to localhost:3306:

    CONFIG_TEXT: define( 'DB_HOST', 'localhost:3306' );

  5. Save the changes and close the file.
  6. Go to Tools & Settings > Scheduled Tasks (Cron jobs).
  7. Using the search field, find the task instances-auto-update.php.
  8. Click Run Now to execute the task. It will update the DB_HOST value in WP Toolkit database.



     

  9. Rerun the backup task in WP Toolkit.

 

Alternative solution: modify DB_HOST value directly in SQLite database of WP Toolkit:

  1. Connect to your server via RDP.
  2. Download a bundle of command-line tools for managing SQLite database files and extract the file sqlite3.exe.
  3. Copy the sqlite3.exe file to the %plesk_dir%var\modules\wp-toolkit folder.
  4. Create copy of WordPress Toolkit sqlite database wp-toolkit.sqlite3 file in the %plesk_dir%var\modules\wp-toolkit folder.
  5. Get affected domain's instance id:

    C:\> plesk ext wp-toolkit --list | findstr example.com
    20 4 \httpdocs 9 working true https://example.com My CMS 6.7.2

  6. Connect to WordPress Toolkit sqlite database and check Woprdpress instance properties using instanceId from step #3.

    C:\> "%plesk_dir%var\modules\wp-toolkit\sqlite3.exe" "%plesk_dir%var\modules\wp-toolkit\wp-toolkit.sqlite3"
    sqlite> .headers on
    sqlite> select * from InstanceProperties WHERE instanceId=20 and name='ConfigSettings';
    instanceId|name|value
    20|ConfigSettings|a:15:{s:8:"WP_DEBUG";b:0;s:12:"WP_DEBUG_LOG";b:0;s:16:"WP_DEBUG_DISPLAY";b:1;s:12:"SCRIPT_DEBUG";b:0;s:11:"SAVEQUERIES";b:0;s:17:"SUBDOMAIN_INSTALL";b:0;s:10:"DB_CHARSET";s:7:"utf8mb4";s:7:"DB_NAME";s:19:"devj164_jurassicdev";s:7:"DB_USER";s:15:"user_dbadmin";s:11:"DB_PASSWORD";s:58:"$AES-128-CBC$FZotRYdKuDIJDe/IOrLsJQ$qUMopiPhdVtjg9aGIZYpHA";s:7:"DB_HOST";s:9:"localhost:1234";s:9:"MULTISITE";b:0;s:19:"WP_AUTO_UPDATE_CORE";s:5:"minor";s:19:"CONCATENATE_SCRIPTS";b:0;s:18:"DISALLOW_FILE_EDIT";b:1;}

    In particular case port 1234 is not valid as Mysql is listen on port 3306.

  7. Update Woprdpress instance, set DB_HOST to "localhost:3306" using instanceId from step #3.

    C:\> UPDATE InstanceProperties SET value='a:15:{s:8:"WP_DEBUG";b:0;s:12:"WP_DEBUG_LOG";b:0;s:16:"WP_DEBUG_DISPLAY";b:1;s:12:"SCRIPT_DEBUG";b:0;s:11:"SAVEQUERIES";b:0;s:17:"SUBDOMAIN_INSTALL";b:0;s:10:"DB_CHARSET";s:7:"utf8mb4";s:7:"DB_NAME";s:19:"devj164_jurassicdev";s:7:"DB_USER";s:15:"user_dbadmin";s:11:"DB_PASSWORD";s:58:"$AES-128-CBC$FZotRYdKuDIJDe/IOrLsJQ$qUMopiPhdVtjg9aGIZYpHA";s:7:"DB_HOST";s:9:"localhost:3306";s:9:"MULTISITE";b:0;s:19:"WP_AUTO_UPDATE_CORE";s:5:"minor";s:19:"CONCATENATE_SCRIPTS";b:0;s:18:"DISALLOW_FILE_EDIT";b:1;}' WHERE instanceId=20 and name='ConfigSettings';

  8. Quit sqlite

    # sqlite> .quit

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.