• Resolved luciusv

    (@luciusv)


    Hello,

    I’m trying to migrate my website from an old server to a new one. I configured my new server with the exact same PHP version as the old server (7.4).

    However, every time I try to open the website on the new server, I encounter this error:

    Parse error: syntax error, unexpected token "=>", expecting "]" in /home/cloudpanel/htdocs/website/wp-content/languages/plugins/wordpress-seo-it_IT.l10n.php on line 2

    Parse error: syntax error, unexpected token "=>", expecting "]" in /home/cloudpanel/htdocs/website/wp-content/languages/it_IT.l10n.php on line 2

    It seems to be related to the language files, but everything works fine on the old server. I can’t figure out where the issue lies.

    Additionally, I can’t access the back-end.

    I also tried disabling the plugin, but the error persists:

    Parse error: syntax error, unexpected token "=>", expecting "]" in /home/cloudpanel/htdocs/website/wp-content/languages/it_IT.l10n.php on line 2

    What can I do to resolve this problem? Should I set the old site to English and then switch to the Italian language after the migration, or is there something I’m missing?

Viewing 2 replies - 1 through 2 (of 2 total)
  • threadi

    (@threadi)

    Are you using exactly the same WordPress version?

    Also check whether the PHP version you have set really works. If you can’t access the backend, you can store phpinfo(); in a PHP file and call it up in your browser.

    Thread Starter luciusv

    (@luciusv)

    First of all, thank you for your responses.

    The issue has now been resolved. The root cause was corruption in some translation files (.po and .php files) that were generated from the corresponding .mo files. These corrupted files, likely damaged during the migration from one server to another, were preventing both access to the WordPress backend and the general functionality of the site.

    To resolve the issue, I deleted the corrupted translation files. Since these files are automatically regenerated from the .mo files, they were successfully recreated without any further intervention. This fixed the errors and restored full access to the backend as well as the proper functionality of the website.

    • This reply was modified 3 months, 3 weeks ago by luciusv.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.