<p>This sounds like an old issue I used to run into.
I think there was an issue with MAMP that was causing it to not parse PHP files. A restart of MAMP fixed that but I found that Chrome (especially) would cache the url and continuously try to download the PHP once it had happened the first time.</p>
<p>The only solution I found was to completely nuke all the history and cached items I could find within Chrome. This was an exercise in frustration but normally worked after a few attempts.</p>
<p>I don't know what version of MAMP you are using but it's worth noting that the problem seems to have disappeared when I updated to MAMP 6</p>

CC BY-SA 4.0
2022-07-06T14:50:59.167Z
I'm using MAMP 6 and Firefox but the same happens in all other browsers. I've tried clearing cache and it doesn't fix it.
cannon303
CC BY-SA 4.0
2022-07-06T12:27:21.600Z
2022-07-06T12:27:21.600Z
foamcow
<p>So I managed to figure out what was happening albeit in part. When I downloaded the site files from the live server I downloaded the whole public_html folder. For some reason MAMP or the craftCMS installation didn't like this. Maybe something to do with permissions on that folder. When I renamed it and created a new public_html folder and moved the files into that things seem to start working. I now get a message: &quot;Service Unavailable - Our site is temporarily unavailable. Please try again later.&quot; but I guess that's a separate issue.</p>

CC BY-SA 4.0
2022-07-06T15:07:15.240Z
2022-07-06T15:07:15.240Z
cannon303
<p>Hi I have downloaded my live site and want to run it locally through Mamp so that I can do an upgrade from 3.7.29 to the new craft 4. I have run craft cms locally before so I know it does work however that is usually from a fresh installation. I have the database and all files installed and I have done the usual configuration in Mamp. I have set .env to look for the local database rather than the live site and use host PRIMARY_SITE_URL=http://localhost:8888 rather than the live host. In general.php I have site url as: 'siteUrl' =&gt; 'http://localhost:8888/' rather than the live url.</p>
<p>When I test out to see the home page in a browser I just get a blank screen (no error) with a file download with a different name on the file each time such as 3J5BZQ7Y and when I open that file in note pad it shows these settings:</p>
<pre><code>&lt;?php
/**
 * Craft web bootstrap file
 */

// Define path constants
define('CRAFT_BASE_PATH', dirname(__DIR__));
define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH . '/vendor');

// Load Composer's autoloader
require_once CRAFT_VENDOR_PATH . '/autoload.php';

// Load dotenv?
if (class_exists('Dotenv\Dotenv') &amp;&amp; file_exists(CRAFT_BASE_PATH . '/.env')) {
    Dotenv\Dotenv::create(CRAFT_BASE_PATH)-&gt;load();
}

// Define additional PHP constants
// (see https://craftcms.com/docs/3.x/config/#php-constants)
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
// ...

// Load and run Craft
/** @var craft\web\Application $app */
$app = require CRAFT_VENDOR_PATH . '/craftcms/cms/bootstrap/web.php';
$app-&gt;run();
</code></pre>
<p>I have tried out different php versions through Mamp to see if it could be that (everything from 5.xx upto 8.08) but still just the same downlaod file. I have also checked in terminal whether php is actually installed with php -v and it says</p>
<p>PHP 8.0.8 (cli) (built: Sep 30 2021 13:54:04) ( NTS )</p>
<p>It says this regardless of which version I choose in Mamp.</p>
<p>Does anyone know what I could be doing wrong please?
Thanks</p>

<mamp>
Installing Craft Pro 3.7.29 locally through mamp doesnt work and just downloads part of the general.php file
# Installing Craft Pro 3.7.29 locally through mamp doesnt work and just downloads part of the general.php file

(Asked by: username_0 on 2022-07-06)

Hi I have downloaded my live site and want to run it locally through Mamp so that I can do an upgrade from 3.7.29 to the new craft 4. I have run craft cms locally before so I know it does work however that is usually from a fresh installation. I have the database and all files installed and I have done the usual configuration in Mamp. I have set .env to look for the local database rather than the live site and use host PRIMARY_SITE_URL=http://localhost:8888 rather than the live host. In general.php I have site url as: 'siteUrl' => 'http://localhost:8888/' rather than the live url.
When I test out to see the home page in a browser I just get a blank screen (no error) with a file download with a different name on the file each time such as 3J5BZQ7Y and when I open that file in note pad it shows these settings:
load();
}

// Define additional PHP constants
// (see https://craftcms.com/docs/3.x/config/#php-constants)
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
// ...

// Load and run Craft
/** @var craft\web\Application $app */
$app = require CRAFT_VENDOR_PATH . '/craftcms/cms/bootstrap/web.php';
$app->run();

I have tried out different php versions through Mamp to see if it could be that (everything from 5.xx upto 8.08) but still just the same downlaod file. I have also checked in terminal whether php is actually installed with php -v and it says
PHP 8.0.8 (cli) (built: Sep 30 2021 13:54:04) ( NTS )
It says this regardless of which version I choose in Mamp.
Does anyone know what I could be doing wrong please?
Thanks

**Tags:** mamp


---

## 2 answers

### Answer by username_1 on 2022-07-06. Score: 1

This sounds like an old issue I used to run into.
I think there was an issue with MAMP that was causing it to not parse PHP files. A restart of MAMP fixed that but I found that Chrome (especially) would cache the url and continuously try to download the PHP once it had happened the first time.

The only solution I found was to completely nuke all the history and cached items I could find within Chrome. This was an exercise in frustration but normally worked after a few attempts.

I don't know what version of MAMP you are using but it's worth noting that the problem seems to have disappeared when I updated to MAMP 6

> **Comments:**
> **username_0**: I'm using MAMP 6 and Firefox but the same happens in all other browsers. I've tried clearing cache and it doesn't fix it.  

---

### Answer by username_0 on 2022-07-06. Score: 1

So I managed to figure out what was happening albeit in part. When I downloaded the site files from the live server I downloaded the whole public\_html folder. For some reason MAMP or the craftCMS installation didn't like this. Maybe something to do with permissions on that folder. When I renamed it and created a new public\_html folder and moved the files into that things seem to start working. I now get a message: "Service Unavailable - Our site is temporarily unavailable. Please try again later." but I guess that's a separate issue.


---

