Home > Enterprise >  WordPress frontend works, but not backend (PHP Parse error: syntax error, unexpected ':',
WordPress frontend works, but not backend (PHP Parse error: syntax error, unexpected ':',

Time:11-04

I've migrated WordPress by using Duplicator plugin. After done the migration, front-end is working fine as expected. When I try to login to the back-end, it displays just white space than nothing. What should I do? Why this happens?

I tried to change the server PHP version, WordPress version, theme, but all of them didn't work. I also disabled all the plugins by changing the plugins folder name. It didn't work either. Not sure what I need to do.

I need help from experts here in stackoverflow since I alredy get helped from here so many times. : )

Thank you.

Just FYI: Here are the some codes in the wp-config.php, up to line 23. screenshot

<?php
define( 'WP_CACHE', true ); // Added by WP Rocket

/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the installation.
 * You don't have to use the web site, you can copy this file to "wp-config.php"
 * and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * Database settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://wordpress.org/support/article/editing-wp-config-php/
 *
 * @package WordPress
 */

CodePudding user response:

I saw the screenshot you attached. There are two blank lines in your codes. I faced something like this issue before and I resolved it by removing white space before <?php starts. Try it out and let me know if it works.

Hope this can resolve your issue. : )

  • Related