<p>You can get this error message even if Craft installation is OK. If you work in MAMP environment and have this error message, check if your PHP and MySQL are available from command line (Terminal).</p>

<p>To check PHP, do following:</p>

<p>Open terminal and type: <code>$ which php</code>
If you see something like "/usr/bin/php" that means MAMP's PHP is not available from command line.</p>

<p>We have to modify the $PATH variable modifying the file ~/.bash_profile located in your root user folder.
Type: <code>$ sudo nano ~/.bash_profile</code></p>

<p>Edit PATH by entering path to MySQL and PHP (pay attention on php version that you have in your MAMP)</p>

<pre><code>PATH=/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php7.3.9/bin:$PATH
</code></pre>

<p>Save changes and reload edited .bash_profile with:</p>

<pre><code>$ source ~/.bash_profile
</code></pre>

<p>Check PHP with:</p>

<pre><code>$ which php
</code></pre>

<p>If you see "/Applications/MAMP/bin/php/php7.3.9/bin/php" this is it ;)</p>

CC BY-SA 4.0
2020-03-16T17:57:23.200Z
In MAMP Pro there is a tickbox which basically does all this for you under PHP > Make this version available on the command line.
James Smith
CC BY-SA 4.0
2020-04-10T14:56:01.840Z
cheers Dusko, this worked for me on MAMP
erwinheiser
CC BY-SA 4.0
2020-04-25T01:17:07.633Z
This was exactly my issue and fixed me up perfectly. Thanks!
Brimby
CC BY-SA 4.0
2020-03-16T15:30:26.750Z
2020-03-16T15:30:26.750Z
Duško Šobić
<p>If you are landing here in 2023: This seems to be a regularly recurring issue for a multitude of problems. Most likely though, your database settings are incorrect.</p>
<ol><li>Double-checking the database connection settings in the <code>config/db.php</code> file to make sure they are correct and the database server is running, keep in mind that in Craft 3 and Craft 4 this will lead you to checking your <code>.env</code> file for the correct variables.  One key ENV variable to check is your <code>DB_TABLE_PREFIX</code> this value is usually default to <code>craft_</code> but could be set to something custom!</li><li>Creating the database and user specified in the <code>config/db.php</code> file, if they do not already exist. Double check that you have the correct user and password!</li><li>Ensuring that the web server has the necessary permissions to read and write to the <code>config/</code> and <code>storage/</code> directories. We usually start with <code>chmod 755</code> and slowly increase from there.</li><li>Clearing the browser cache and cookies, as sometimes this can cause issues with the installation process. Another easy way is to just use an incognito browser for a sanity check, as there usually is no browser cache or leftover cookies associated with an incognito session.</li><li>Checking the PHP error logs for more information about the specific issue. You can find the logs for Craft in <code>storage/logs/*.log</code></li><li>Check the craft version you are using if it matches with your php version. This is especially true if this is a Craft 4 site, as there is now a requirement of PHP 8.&nbsp;</li></ol>
<p>You can read more here:  <a href="https://www.brilliancenw.com/blog/updating-craft-craft-isnt-installed-yet" rel="nofollow noreferrer">Craft CMS Isn't Installed Yet?</a></p>

CC BY-SA 4.0
2023-01-23T21:40:58.203Z
2023-01-23T21:40:58.203Z
Brett Moore
<p>Have you tried running <code>./craft setup</code> to double check if your setup is correct? </p>

<p>If <code>./craft setup</code> completes successfully <code>./craft</code> should find the existing installation and complete any required setup. </p>

<p>In my experience, this is usually related to a non-default <code>/config/db.php</code> or problematic <code>.env</code> file.</p>

<p>Note: Always do a backup before trying anything related to setup just to be on the safe side.</p>

CC BY-SA 4.0
2020-04-17T05:08:17.147Z
In my case the `craft.bat` file was missing. You might double check that as well ;)
outline4
CC BY-SA 4.0
2020-07-02T11:25:41.987Z
My issue was using `localhost` instead of `127.0.01` - the latter worked.
iamkeir
CC BY-SA 4.0
2019-01-29T18:59:41.220Z
2019-01-30T10:02:01.637Z
2019-01-30T10:02:01.637Z
Panos Spiliotis
<p>I just updated to Craft 3.1 and logged into the admin to make the required updates to the database and this all worked fine. However, when I use the new <code>./craft update</code> CLI feature, it responds with "Craft isn't installed yet", even though it's on a year old Craft project and just successfully updated to Craft 3.1?</p>

<p>There's not really any other messages to go on for this one. See below.</p>

<p><a href="https://i.sstatic.net/Qbntf.png" rel="noreferrer"><img src="https://i.sstatic.net/Qbntf.png" alt="Craft 3.1 update error"></a></p>

<craft3><updates><composer><cli>
"Craft isn't installed yet" error after updating to Craft 3.1
# "Craft isn't installed yet" error after updating to Craft 3.1

(Asked by: username_0 on 2019-01-29)

I just updated to Craft 3.1 and logged into the admin to make the required updates to the database and this all worked fine. However, when I use the new `./craft update` CLI feature, it responds with "Craft isn't installed yet", even though it's on a year old Craft project and just successfully updated to Craft 3.1?

There's not really any other messages to go on for this one. See below.

[![Craft 3.1 update error](https://i.sstatic.net/Qbntf.png)](https://i.sstatic.net/Qbntf.png)

**Tags:** craft3, updates, composer, cli

---

## 3 answers

### Answer by username_6 on 2019-01-29. Score: 7 | Accepted answer

Have you tried running `./craft setup` to double check if your setup is correct?

If `./craft setup` completes successfully `./craft` should find the existing installation and complete any required setup.

In my experience, this is usually related to a non-default `/config/db.php` or problematic `.env` file.

Note: Always do a backup before trying anything related to setup just to be on the safe side.

> **Comments:**
> **username_7**: In my case the `craft.bat` file was missing. You might double check that as well ;)  
> **username_8**: My issue was using `localhost` instead of `127.0.01` - the latter worked.  

---

### Answer by username_1 on 2020-03-16. Score: 5

You can get this error message even if Craft installation is OK. If you work in MAMP environment and have this error message, check if your PHP and MySQL are available from command line (Terminal).
To check PHP, do following:
Open terminal and type: $ which php
If you see something like "/usr/bin/php" that means MAMP's PHP is not available from command line.
We have to modify the $PATH variable modifying the file ~/.bash_profile located in your root user folder.
Type: $ sudo nano ~/.bash_profile
Edit PATH by entering path to MySQL and PHP (pay attention on php version that you have in your MAMP)
PATH=/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php7.3.9/bin:$PATH

Save changes and reload edited .bash_profile with:
$ source ~/.bash_profile

Check PHP with:
$ which php

If you see "/Applications/MAMP/bin/php/php7.3.9/bin/php" this is it ;)

> **Comments:**
> **username_2**: In MAMP Pro there is a tickbox which basically does all this for you under PHP > Make this version available on the command line.  
> **username_3**: cheers Dusko, this worked for me on MAMP  
> **username_4**: This was exactly my issue and fixed me up perfectly. Thanks!  

---

### Answer by username_5 on 2023-01-23. Score: 1

If you are landing here in 2023: This seems to be a regularly recurring issue for a multitude of problems. Most likely though, your database settings are incorrect.

1. Double-checking the database connection settings in the `config/db.php` file to make sure they are correct and the database server is running, keep in mind that in Craft 3 and Craft 4 this will lead you to checking your `.env` file for the correct variables. One key ENV variable to check is your `DB_TABLE_PREFIX` this value is usually default to `craft_` but could be set to something custom!
2. Creating the database and user specified in the `config/db.php` file, if they do not already exist. Double check that you have the correct user and password!
3. Ensuring that the web server has the necessary permissions to read and write to the `config/` and `storage/` directories. We usually start with `chmod 755` and slowly increase from there.
4. Clearing the browser cache and cookies, as sometimes this can cause issues with the installation process. Another easy way is to just use an incognito browser for a sanity check, as there usually is no browser cache or leftover cookies associated with an incognito session.
5. Checking the PHP error logs for more information about the specific issue. You can find the logs for Craft in `storage/logs/*.log`
6. Check the craft version you are using if it matches with your php version. This is especially true if this is a Craft 4 site, as there is now a requirement of PHP 8.

You can read more here: [Craft CMS Isn't Installed Yet?](https://www.brilliancenw.com/blog/updating-craft-craft-isnt-installed-yet)


---

