PHP Parse error in Wordpress project from WPEngine backup

I inherited a Wordpress project and I am trying to customize it. I have zero experience with Wordpress and I can say that I have zero experience with PHP. So far I have managed to set up an environment on my local machine, but I am stuck on a PHP parsing error that I cannot find a googling solution. I would like to at least run an existing project on my machine.

When I open my site locally I am redirected to $ ROOT / wp-admin / install.php and I get this error in apache error_log:

[Wed Oct 22 22:32:42 2014] [error] [client ::1] PHP Parse error:  parse error in /path/to/project/wp-content/mu-plugins/wpengine-common/plugin.php on line 788

      

Line 788

    public function disable_indiv_plugin_update_notices( $value ) {

      

and the surrounding code

function wpengine_credits() {

        if ( get_option( 'stylesheet' ) != 'twentyeleven' && get_option( 'template' ) != 'twentyeleven' )
        return false;

    if ( !defined('WPE_FOOTER_HTML') OR !WPE_FOOTER_HTML OR $this->already_emitted_powered_by == true )
        return false;

    //to prevent repeating
    $this->already_emitted_powered_by = true; ?>
        <div id="site-host">
                WP Engine <a href="http://wpengine.com" title="<?php esc_attr_e( 'Managed WordPress Hosting', 'wpengine' ); ?>"><?php printf( __( '%s.', 'wpengine' ), 'WordPress Hosting' ); ?></a>
    </div>
        <?php
    }

public function disable_indiv_plugin_update_notices( $value ) {
        $plugins_to_disable_notices_for = array();
        $basename = '';
        foreach ( $plugins_to_disable_notices_for as $plugin )
                $basename = plugin_basename( $plugin );
        if ( isset( $value->response[@$basename] ) )
                unset( $value->response[$basename] );
        return $value;
    }

public function get_powered_by_html( $affiliate_code = null ) {
    if ( ( ! defined('WPE_FOOTER_HTML') OR !WPE_FOOTER_HTML ) AND !$this->is_widget ) return "";

    $this->already_emitted_powered_by = true;

    if(WPE_FOOTER_HTML !== "") {
        $html = WPE_FOOTER_HTML;
    } else {
        $html = $this->view('general/powered-by',array('affiliate_code'=>$affiliate_code),false);
    }


    return "<span class=\"wpengine-promo\">$html</span>";
}

      

I have a feeling it has something to do with my PHP version. I am running PHP 5.4.30. Other solutions to similar problems suggested using

Any suggestions would be appreciated.

+3


source to share


1 answer


Delete the mu-plugins folder in LOCAL environment ... the error you are seeing is a special plugin that WP Engine runs on their servers for internal use. It will, as you can see, fail if it goes outside the WP Engine environment.



Just make sure you don't delete the mu-plugins folder on the WP Engine server when you reset your local environment!

+10


source







All Articles