Wordpress shows blank page or 500 error

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows

Created:

2016-11-16 12:48:23 UTC

Modified:

2016-12-21 19:15:30 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Wordpress shows blank page or 500 error

Symptoms

  1. Wordpress shows blank page or 500 HTTP error.

  2. In " /usr/local/psa/admin/logs/panel.log " file the following error may be found:

    Non-zero exit status returned by script. Output stream: 'PHP Warning: fread(): Length parameter must be greater than 0 in /usr/local/psa/var/apspackages/apscatalog0TajXt.zip094da88d-32ce-b8/cache/scripts/file-util.php on line 10 '. Error stream: 'PHP Warning: fread(): Length parameter must be greater than 0 in /usr/local/psa/var/apspackages/apscatalog0TajXt.zip094da88d-32ce-b8/cache/scripts/file-util.php on line 10 '.
  3. In error_log of domain the following error may appear:

    PHP Fatal error:  Call to undefined function wp()

Cause

" wp-config.php " configuration file of the domain is empty or is missing

Resolution

For new Wordpress installations:

Follow instructions to setup new Wordpress installation provided by Wordpress. Also, it is possible to regenerate " wp-config.php " file using this resource .

Make sure that you created a database in Domains > example.com > Databases > add database and specified database name, username and password in " wp-config.php " file.

For already existing Wordpress installations:

Restore the file from backup, or create it using Wordpress PHP tools. If you have only native Plesk backup of domain you may open it manually using '7Zip', for example.

If you have old " wp-config.php " file in backup and current MySQL username and/or password for Wordpress were changed from that time, follow these steps:

  1. Upload wp-config.php file to the directory where Wordpress is installed: " /var/www/vhosts/example.com/httpdocs/wordpress "

  2. In Plesk go to Websites and Domains > Databases > Users create new user for Wordpress database.

  3. Update 'wp-config.php' file with new database username and login. The following records should be changed:

    /** MySQL database username */
    define('DB_PASSWORD', 'new_secret_DB_password');
    define('DB_USER', 'new_user_name');
    /** MySQL database password */
  4. Test Wordpress application in browser

Have more questions? Submit a request
Please sign in to leave a comment.