Support » Localhost Installs » Live to Local with MAMP downloads PHP file instead of loading website

  • I’m having issues with a local install of my live website with MAMP.

    These are the steps I took:
    – I copied the live site wordpress files via FTP and loaded them into a folder within htdocs
    – Downloaded the live site’s database from my host
    – Created a database in local PHPMyAdmin and imported the live site’s database
    – Added a user with the same credentials of live site’s database
    – Used an SQL query to replace with http://localhost/localsite

    Localhost shows “Index of” but clicking the link to /localsite prompts a download of a PHP file that reads:

     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     * @package WordPress
     * Tells WordPress to load the WordPress theme and output it.
     * @var bool
    define( 'WP_USE_THEMES', true );
    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/wp-blog-header.php' );

    Can anyone help?

    • This topic was modified 2 years, 7 months ago by mpd7.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    I am not sure what is the cause of your issue, but I would suggest using this plugin instead of manually cloning your website to localhost. It is much easier this way.

    Thank you

    Thread Starter mpd7


    Thanks, I tried duplicator but I get this error when running the installer:

    server code: 200
    status: OK
    No tables where created during step 1 of the install. Please review the installer-log.txt file for sql error messages. You may have to manually run the installer-data.sql with a tool like phpmyadmin to validate the data input. If you have enabled compatibility mode during the package creation process then the database server version your using may not be compatible with this script.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Live to Local with MAMP downloads PHP file instead of loading website’ is closed to new replies.