Articles in this section

Unable to open WordPress instance in Plesk: eval()'d code on line 1

Plesk for Linux kb: technical ext: wptk

Applicable to:

  • Plesk for Linux

Symptoms

  • The following error is shown when opening a WordPress instance at WordPress > example.com page:

    CONFIG_TEXT: PHP Parse error: syntax error, unexpected '?' in /usr/share/plesk-wp-cli/php/WP_CLI/Runner.php(996): eval()'d code on line 1

  • Symbols like <U+FEEF> can be observed in the beginning of the wp-config.php file over command-line interface using less tool:

    # less /var/www/vhosts/example.com/httpdocs/wp-config.php
    <U+FEFF><?php
    ...

Cause

Hidden incorrect symbols in wp-config.php file.

Resolution

  1. Log in to the server via SSH.

  2. Rename the current wp-config.php file.

    # mv /var/www/vhosts/example.com/httpdocs/wp-config.php{,.orig}

  3. Create a new one by copying the content from the renamed file using cat tool:

    # cat /var/www/vhosts/example.com/httpdocs/wp-config.php.orig > /var/www/vhosts/example.com/httpdocs/wp-config.php

Note: replace example.com with the actual domain's name in the commands above.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.