I am importing a Wordpress site for somebody and I am getting the white screen. In WP_DEBUG it is giving me this error: Parse error: syntax error, unexpected T_FUNCTION in /wp-content/plugins/edit-guests.php on line 5 Here is the code surrounding line 5:
Line 5 is the line that starts with "add_action". I am sure this is a novice's mistake, but any help is greatly appreciated, thank you so much! Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) in /home/domain/public_html/wp-includes/widgets/class-wp-widget-text.php on line 59
Parse error: syntax error, unexpected ‘<', expecting end of file in /home1/runwaym3/public_html/wp-content/themes/siteorigin-unwind/functions.php on line 301 Now i can't login to my dashboard. My site shows this error. Please Help! :( This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license. We all know the importance of PHP in core WordPress. It is the foundational coding technology used for the CMS. PHP versions below 5.5 are declared unsupported by PHP itself and have come to “End Of Life“. Upgrading to the latest version of PHP is essential to ensure that your site is secure and compatible with all the versions and features of WordPress. To upgrade the PHP version for your website, just contact your hosting company and they will be happy to do it for you. Many times, when installing a new plugin or theme, you may encounter the Parse error: syntax error, unexpected T_FUNCTION error. This error is basically indicating you that there’s something wrong in one of your functions. Most of the times, you should also get the exact located of where the error actually appears – Parse error: syntax error, unexpected T_FUNCTION in /public_html/wp-content/themes/custom-theme-name/functions.php on line 123. Fixing the “Parse error: syntax error, unexpected T_FUNCTION” ErrorThere are multiple ways in which you could fix the “Parse error: syntax error, unexpected T_FUNCTION” error. We’ll explore the different methods here, but first, let’s discuss the actual origin of these errors. Basically, the T_FUNCTION error appears whenever there’s some syntax errors within your plugin or theme files. It can either be a non-valid part of your code, or alternatively the plugin or theme is trying to use features of a more advanced PHP version than the one actually installed on your server. Method 1: Upgrading Your PHP Version (Recommended)This method would be the best way to solve the “Parse error: syntax error, unexpected T_FUNCTION” error. Specifically if it really originates from a use of new PHP features while you are running an outdated version. Running an updated PHP version could both solve these errors and upgrade your performance, so it’s a double win for you! Most hosts would allow you to manually change the PHP version via the cPanel:
If you don’t have access to the cPanel, or prefer that the hosting provider deals with it, you can try contacting them by email with the following message: Hello, |