Article ID: 123176, created on Oct 17, 2014, last review on Oct 17, 2014

  • Applies to:
  • Plesk 12.0 for Linux


  1. I installed second PHP 5.4 on server and switched domain to use it.
  2. Now when I open Wordpress on domain, I got error:

    Error establishing a database connection
  3. If I switched back to PHP53, Wordpress works.


Default mysql socket is not specified in php.ini for additional PHP.


  1. Make sure that default mysql socket is specified in php.ini:

    grep -ir mysql.sock /usr/local/php540-cgi/php.ini |grep -v ';'
    mysql.default_socket = /var/lib/mysql/mysql.sock
  2. Switch PHP version on domain after changes in main php.ini file.

29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c 2a5151f57629129e26ff206d171fbb5f e335d9adf7edffca6a8af8039031a4c7

Email subscription for changes to this article
Save as PDF