Why does wordpress not install?

February 9, 2018 431 views
PHP Ubuntu 16.04

having reinstalled my server i am unable to install WP. It keeps telling me php is not running, IT IS, version 7 in fact. This is getting beyond a joke. 4 frickin days spent on this nonsense.

2 comments
  • ' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab above the screen title.' ) . '

    '; $screen = getcurrentscreen(); $screen->addhelptab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '
    '; $help .= '

    ' . _( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '
    '; $screen->add
    helptab( array( 'id' => 'help-navigation', 'title' => _( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '
    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '
    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '
    '; $help .= '

    ' . _( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '
    '; $screen->add
    helptab( array( 'id' => 'help-layout', 'title' => _( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . _( 'The boxes on your Dashboard screen are:' ) . '
    '; if ( current
    usercan( 'editposts' ) ) $help .= '

    ' . __( 'At A Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '
    '; $help .= '

    ' . _( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '
    '; if ( is
    blogadmin() && currentusercan( 'editposts' ) ) $help .= '

    ' . _( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 5 most recent draft posts you've started." ) . '
    '; if ( ! is
    multisite() && currentusercan( 'install_plugins' ) ) $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL */ _( 'WordPress News — Latest news from the official WordPress project, the WordPress Planet, and popular plugins.' ), _( 'https://planet.wordpress.org/' ) ) . '
    '; else $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL */ _( 'WordPress News — Latest news from the official WordPress project and the WordPress Planet.' ), _( 'https://planet.wordpress.org/' ) ) . '
    '; if ( currentusercan( 'editthemeoptions' ) ) $help .= '

    ' . _( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '
    '; $screen->add
    helptab( array( 'id' => 'help-content', 'title' => _( 'Content' ), 'content' => $help, ) ); unset( $help ); $screen->sethelpsidebar( '

    ' . __( 'For more information:' ) . '
    ' . '

    ' . __( 'Documentation on Dashboard' ) . '
    ' . '

    ' . _( 'Support Forums' ) . '
    ' ); include( ABSPATH . 'wp-admin/admin-header.php' ); ?>
    user
    email != getoption( 'adminemail' ) ); if ( $hide ) $classes .= ' hidden'; ?>

  • WordPress
    Error: PHP is not running

    WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

    prepare( "SHOW TABLES LIKE %s", $wpdb->esclike( $wpdb->users ) ); $usertable = ( $wpdb->getvar( $sql ) != null ); // Ensure that Blogs appear in search engines by default. $blogpublic = 1; if ( isset( $POST['weblogtitle'] ) ) { $blogpublic = isset( $POST['blogpublic'] ); } $weblogtitle = isset( $POST['weblogtitle'] ) ? trim( wpunslash( $POST['weblogtitle'] ) ) : ''; $username = isset($POST['username']) ? trim( wpunslash( $POST['username'] ) ) : ''; $adminemail = isset( $POST['adminemail'] ) ? trim( wpunslash( $POST['adminemail'] ) ) : ''; if ( ! isnull( $error ) ) { ?>

    '; } else { ?>
    

    />
    />

    />

    'submit' ) ); ?>
    ' . __( 'Already Installed' ) . '' . '

    ' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '
    ' . '

    ' . _( 'Log In' ) . '
    ' . '' ); } /** * @global string $wp
    version * @global string $requiredphpversion * @global string $requiredmysqlversion * @global wpdb $wpdb / global $wpversion, $requiredphpversion, $requiredmysqlversion; $phpversion = phpversion(); $mysqlversion = $wpdb->dbversion(); $phpcompat = versioncompare( $phpversion, $requiredphpversion, '>=' ); $mysqlcompat = versioncompare( $mysqlversion, $requiredmysqlversion, '>=' ) || fileexists( WPCONTENTDIR . '/db.php' ); if ( !$mysqlcompat && !$php_compat ) { / translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number / $compat = sprintf( _( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wpversion, $requiredphpversion, $requiredmysqlversion, $phpversion, $mysqlversion ); } elseif ( !$php_compat ) { / translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number / $compat = sprintf( _( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wpversion, $requiredphpversion, $phpversion ); } elseif ( !$mysqlcompat ) { / translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */ $compat = sprintf( _( 'You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wpversion, $requiredmysqlversion, $mysqlversion ); } if ( !$mysqlcompat || !$phpcompat ) { displayheader(); die( '
    ' . __( 'Insufficient Requirements' ) . '

    ' . $compat . '
    ' ); } if ( ! isstring( $wpdb->baseprefix ) || '' === $wpdb->baseprefix ) { displayheader(); die( '
    ' . __( 'Configuration Error' ) . '
    ' . '

    ' . sprintf( /* translators: %s: wp-config.php */ _( 'Your %s file has an empty database table prefix, which is not supported.' ), 'wp-config.php' ) . '
    ' ); } // Set error message if DO
    NOTUPGRADEGLOBALTABLES isn't set as it will break install. if ( defined( 'DONOTUPGRADEGLOBALTABLES' ) ) { displayheader(); die( '
    ' . __( 'Configuration Error' ) . '
    ' . '

    ' . sprintf( /* translators: %s: DONOTUPGRADEGLOBALTABLES / _( 'The constant %s cannot be defined when installing WordPress.' ), 'DONOTUPGRADEGLOBAL_TABLES' ) . '
    ' ); } /
    * * @global string $wplocalpackage * @global WPLocale $wplocale */ $language = ''; if ( ! empty( $REQUEST['language'] ) ) { $language = pregreplace( '/[^a-zA-Z0-9]/', '', $REQUEST['language'] ); } elseif ( isset( $GLOBALS['wplocalpackage'] ) ) { $language = $GLOBALS['wplocalpackage']; } $scriptstoprint = array( 'jquery' ); switch($step) { case 0: // Step 0 if ( wpcaninstalllanguagepack() && empty( $language ) && ( $languages = wpgetavailabletranslations() ) ) { $scriptstoprint[] = 'language-chooser'; displayheader( 'language-chooser' ); echo '
    '; wpinstalllanguageform( $languages ); echo '
    '; break; } // Deliberately fall through if we can't reach the translations API. case 1: // Step 1, direct link or from language chooser. if ( ! empty( $language ) ) { $loaded
    language = wpdownloadlanguagepack( $language ); if ( $loadedlanguage ) { loaddefaulttextdomain( $loadedlanguage ); $GLOBALS['wplocale'] = new WPLocale(); } } $scriptstoprint[] = 'user-profile'; displayheader(); ?>

    error ) ) wpdie( $wpdb->error->geterrormessage() ); $scriptstoprint[] = 'user-profile'; displayheader(); // Fill in the data we gathered $weblogtitle = isset( $POST['weblogtitle'] ) ? trim( wpunslash( $POST['weblogtitle'] ) ) : ''; $username = isset($POST['username']) ? trim( wpunslash( $POST['username'] ) ) : ''; $adminpassword = isset($POST['adminpassword']) ? wpunslash( $POST['adminpassword'] ) : ''; $adminpasswordcheck = isset($POST['adminpassword2']) ? wpunslash( $POST['adminpassword2'] ) : ''; $adminemail = isset( $POST['adminemail'] ) ?trim( wpunslash( $POST['adminemail'] ) ) : ''; $public = isset( $POST['blogpublic'] ) ? (int) $POST['blogpublic'] : 1; // Check email address. $error = false; if ( empty( $username ) ) { // TODO: poka-yoke displaysetupform( _( 'Please provide a valid username.' ) ); $error = true; } elseif ( $username != sanitizeuser( $username, true ) ) { displaysetupform( _( 'The username you provided has invalid characters.' ) ); $error = true; } elseif ( $adminpassword != $adminpasswordcheck ) { // TODO: poka-yoke displaysetupform( _( 'Your passwords do not match. Please try again.' ) ); $error = true; } elseif ( empty( $adminemail ) ) { // TODO: poka-yoke displaysetupform( _( 'You must provide an email address.' ) ); $error = true; } elseif ( ! isemail( $adminemail ) ) { // TODO: poka-yoke displaysetupform( _( 'Sorry, that isn’t a valid email address. Email addresses look like username@example.com.' ) ); $error = true; } if ( $error === false ) { $wpdb->showerrors(); $result = wpinstall( $weblogtitle, $username, $adminemail, $public, '', wpslash( $adminpassword ), $loadedlanguage ); ?>

1 Answer

Can you share some details on what steps you took to install your webserver (and what server you are running) and PHP?

If you are running Nginx as your web server you will need php-fpm installed, configured and running in order to process PHP scripts.

If you are running Apache ensure you have libapache2-mod-php installed and not just the CLI version of PHP.

Another thing to check is that your WordPress files and folders are owned by the user the web server is running as. On Ubuntu this will be www-data by default.

Have another answer? Share your knowledge.