Title: Parse error: syntax error, unexpected &#039;/&#039; on line 12 .php
Last modified: August 30, 2016

---

# Parse error: syntax error, unexpected '/' on line 12 .php

 *  Resolved [cljbrown](https://wordpress.org/support/users/cljbrown/)
 * (@cljbrown)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/)
 * Hi All,
 * trying to help a friend out with issues he has been having with his site.
 * For a quick background overview, he first got the “WP White Screen of Death”,
   
   by which I went in and de-activated a recently upgraded Jetpack plugin that seemed
   to cause the issue.
 * Site was up and running again.
 * Then Google showed “this site may be hacked” in search results.
 * After following the Google instructions through their Search Console, I went 
   in to his GoDaddy File Manager and found over 8,000 spammy files, of which I 
   deleted and re-submitted to Google For evaluation.
 * That got rid of the “this site may be hacked” link in search results, but now
   the site shows: **Parse error: syntax error, unexpected ‘/’ in /home/content/
   02/6193502/html/wp-blog-header.php on line 12**
 * when going into this file, I don’t necessarily see any issues, but then again
   I don’t know what exactly the original code should look like…
 * here is the code currently in the file:
 *     ```
       <?php
       /**
        * Loads the WordPress environment and template.
        *
        * @package WordPress
        */
   
       if ( !isset($wp_did_header) ) {
   
       	$wp_did_header = true;
   
       	require_once( dirname(__FILE__) . /wp-load.php );
   
       	wp();
   
       	require_once( ABSPATH . WPINC . /template-loader.php );
   
       }
       ```
   
 * I am assuming that this error was sparked from the spammy files? I want to fix
   this issue but don’t know where to start.
 * Please help! Site is here: [http://sugarpercussion.com/](http://sugarpercussion.com/)
 * THANKS!

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/page/2/?output_format=md)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521197)
 * Line 12 is calling /wp-load.php, so it’s something in that file.
 * Probably best to try [downloading WordPress](https://wordpress.org/download/)
   again and delete then replace your copies of everything **except** the `wp-config.
   php` file and the `/wp-content/` directory with fresh copies from the download.
   This will effectively replace all of your core files without damaging your content
   and settings. Some uploaders tend to be unreliable when overwriting files, so
   don’t forget to delete the original files before replacing them.
 *  Thread Starter [cljbrown](https://wordpress.org/support/users/cljbrown/)
 * (@cljbrown)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521205)
 * So I need to delete everything in the root directory except the wp-config.php
   and the /wp-content? folder, but couldn’t those files include malicious code 
   from the initial hack as well?
 * Will the core file restore alter the look and feel of the website once completed?
 * Is there also a way to prevent this from occurring in the future?
 * I appreciate the help on this.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521215)
 * If you still haven’t cleaned up the original hack, carefully follow [this guide](https://codex.wordpress.org/FAQ_My_site_was_hacked).
   When you’re done, you may want to implement some (if not all) of [the recommended security measures](https://codex.wordpress.org/Hardening_WordPress).
 *  [cyprianr](https://wordpress.org/support/users/cyprianr/)
 * (@cyprianr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521245)
 * Hey.
 * I just came across the same syntax error.
 * Parse error: syntax error, unexpected ‘/’ in /home/cyprianf/public_html/wp-blog-
   header.php on line 12
 * [http://www.cyprianfrancis.com](http://www.cyprianfrancis.com)
 * Looking for a solution, but want to address this to the public in case it might
   be a specific plugin causing it.
 *  [cyprianr](https://wordpress.org/support/users/cyprianr/)
 * (@cyprianr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521246)
 * Are you by chance on Hostgator?
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521247)
 * Don’t try to “fix” files like this. Just get the original copy from here and 
   replace the file with the known good one.
 * [https://wordpress.org/download/](https://wordpress.org/download/)
 * For reference, this line is incorrect:
 * `require_once( dirname(__FILE__) . /wp-load.php );`
 * Do you notice why? If not, then you’re not qualified to try to fix it. Just download
   an original ZIP file of WordPress, and replace all the WordPress files with the
   good copies.
 *  [cyprianr](https://wordpress.org/support/users/cyprianr/)
 * (@cyprianr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521250)
 * Hey, so I just fixed this error by going into to the wordpress backend and reinstalling
   the most recent version of wordpress. Worked like a charm.
 * Good luck!
 *  Thread Starter [cljbrown](https://wordpress.org/support/users/cljbrown/)
 * (@cljbrown)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521271)
 * Thanks for the help, All!
 * Back online for now, and at least know where to start should this happen again.
 * Time to back-up and change credentials!
 * Truly appreciate the insight.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521272)
 * Thanks for sharing your solution!
 *  [michael.lyons](https://wordpress.org/support/users/michaellyons/)
 * (@michaellyons)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521283)
 * Updated to version 4.3, issue resolved.
 * Thanks for the advice.
 *  [pixelaid](https://wordpress.org/support/users/pixelaid/)
 * (@pixelaid)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521335)
 * I spent last night cleaning up 3 sites with this exact problem.
 * On one site, the wp-blog-header.php had “visitortracker” code appended. That 
   led me to search through various files where I discovered lots of visitortracker
   code in JS files throughout all 3 sites. Most were JS files in plugins, but some
   were buried in wp-includes/Simplepie and wp-includes/Text/Diff
 * I initially found some of them by noticing the recent date changes that did not
   match other files in the same folder. There were also added files that did not
   match my backups.
 * So I changed all passwords, new salt keys, reinstalled fresh WP 4.3 (4.3 was 
   already installed but I wanted to make sure I had all new files), reinstalled
   all plugins (using sucuri’s plugin), then added iThemes Security.
 * I hope it’s not a WP 4.3 issue. I assume it was a vulnerability in either a plugin
   that had not been updated on time, or maybe something with the server (HostGator).
   We’re contacting them too.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521338)
 * You may want to implement some (if not all) of [the recommended security measures](https://codex.wordpress.org/Hardening_WordPress).
 *  [MarynaSmuts](https://wordpress.org/support/users/marynasmuts/)
 * (@marynasmuts)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521364)
 * I had the same issue with 2 of my own sites (on HostGator) 2 days ago and this
   morning one of my clients (also HostGator) reported the same issue.
 * By comparing to other sites that are working, I figured out the problem was missing
   single quotes in these lines of code in wp-blog-header.php
    ______________ require_once(
   dirname(__FILE__) . /wp-load.php );
 *  wp();
 *  require_once( ABSPATH . WPINC . /template-loader.php );
    _______________ I corrected
   the code by adding back those single quotes to look like this, and the sites 
   came back up. _________________ require_once( dirname(__FILE__) . ‘/wp-load.php’);
 *  wp();
 *  require_once( ABSPATH . WPINC . ‘/template-loader.php’ );
    _______________
 * I would love to know what’s causing this. For my client’s site, she did report
   that she added a new blog post and then the error showed up when she tried to
   view the site. Her site is protected by Sitelock, but mine aren’t.
 * Any clarification on what might be causing this would be most appreciated.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521365)
 * Did it only happen once, or does it continue to happen?
 *  [MarynaSmuts](https://wordpress.org/support/users/marynasmuts/)
 * (@marynasmuts)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/#post-6521366)
 * It only happened once on each of the sites. The error hasn’t come back since 
   I repaired the code in wp-blog-header.php
 * It showed up on 2 of my own sites this past Monday, and on my client’s site a
   few hours ago.
 * I logged a ticket with HostGator, but haven’t yet heard back.

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/page/2/?output_format=md)

The topic ‘Parse error: syntax error, unexpected '/' on line 12 .php’ is closed 
to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [site hacked](https://wordpress.org/support/topic-tag/site-hacked/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 28 replies
 * 9 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-on-line-12-php-please-help/page/2/#post-6521484)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
