<p>To delete craft, all you need to do is delete the <code>craft/app</code> folder, so you don't lose all your templates/plugins etc. That said, this won't affect your site url as <code>siteUrl</code> stored in the database.</p>

<p>Here are a few options:</p>

<ol>
<li><p>You would need to go into the database under the table <code>craft_info</code> and then change <code>siteUrl</code> back to localhost or whatever you need it to be.</p></li>
<li><p>If you have only just gone through the installation page then you can just delete the database and start again.</p></li>
</ol>

<p>My most preferred thing to do to avoid these sort of issues is to set the <code>siteUrl</code> within a config file and simply reference it.</p>

<p>For example in <code>craft/config/general.php</code> you would have:</p>

<pre><code>return array(
 '*' =&gt; array(
   'environmentVariables' =&gt; array(
     'siteUrl' =&gt; 'localhost'
   )
 ),
 '.com' =&gt; array(
   'environmentVariables' =&gt; array(
     'siteUrl' =&gt; 'http://somedomain.com'
   )
 )
);
</code></pre>

<p>So basically here we are setting the <code>siteUrl</code> config within a wildcard config using <code>*</code> which means it gets applied to all environments.</p>

<p>Straight after we are then overriding the <code>siteUrl</code> config for just <code>.com</code> domains.</p>

<p>See <a href="https://craftcms.com/docs/multi-environment-configs">Multi environment config</a> and <a href="https://craftcms.com/docs/multi-environment-configs#environment-specific-variables">Multi environment variables</a> </p>

<p>The beauty of this is now when you install Craft (or change <code>siteUrl</code> in the database) you only need to put <code>{siteUrl}</code> within the input and Craft will automatically fetch the value from your config file, based on your environment.</p>

<p>Hope that helps!</p>

CC BY-SA 3.0
2016-06-07T11:18:45.243Z
That helps! I ended up deleting the database. Never knew the contents of db.php is still there and back again even though i deleted the whole craft folder.
Keanu Kent Gargar
CC BY-SA 3.0
2016-06-07T11:08:03.093Z
2016-06-07T11:08:03.093Z
Alec Ritson
<p>I have to reinstall it because i f'up by changing "localhost" to "mysite.dev" on the installation page.</p>

<uninstall>
How to remove entire Craft CMS folder? or rather uninstall it
# How to remove entire Craft CMS folder? or rather uninstall it

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

I have to reinstall it because i f'up by changing "localhost" to "mysite.dev" on the installation page.

**Tags:** uninstall

---

## 1 answers

### Answer by username_1 on 2016-06-07. Score: 6 | Accepted answer

To delete craft, all you need to do is delete the craft/app folder, so you don't lose all your templates/plugins etc. That said, this won't affect your site url as siteUrl stored in the database.
Here are a few options:

You would need to go into the database under the table craft_info and then change siteUrl back to localhost or whatever you need it to be.
If you have only just gone through the installation page then you can just delete the database and start again.

My most preferred thing to do to avoid these sort of issues is to set the siteUrl within a config file and simply reference it.
For example in craft/config/general.php you would have:
return array(
 '*' => array(
   'environmentVariables' => array(
     'siteUrl' => 'localhost'
   )
 ),
 '.com' => array(
   'environmentVariables' => array(
     'siteUrl' => 'http://somedomain.com'
   )
 )
);

So basically here we are setting the siteUrl config within a wildcard config using * which means it gets applied to all environments.
Straight after we are then overriding the siteUrl config for just .com domains.
See Multi environment config and Multi environment variables 
The beauty of this is now when you install Craft (or change siteUrl in the database) you only need to put {siteUrl} within the input and Craft will automatically fetch the value from your config file, based on your environment.
Hope that helps!

> **Comments:**
> **username_0**: That helps! I ended up deleting the database. Never knew the contents of db.php is still there and back again even though i deleted the whole craft folder.  

---

