# Kirby site not rendering in localhost

**URL:** <https://forum.getkirby.com/t/kirby-site-not-rendering-in-localhost/12281>\
**Category:** Questions\
**Tags:** v3\
**Created:** [January 20, 2019, 12:26pm UTC](https://forum.getkirby.com/t/kirby-site-not-rendering-in-localhost/12281 "2019-01-20T12:26:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jensschnitzler](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jensschnitzler/32/5999_2.png) [@jensschnitzler](https://forum.getkirby.com/u/jensschnitzler)\
**Post date:** [January 20, 2019, 12:26pm UTC](https://forum.getkirby.com/t/kirby-site-not-rendering-in-localhost/12281/1 "2019-01-20T12:26:42Z")

</div>

Hi, I’m unsuccessfully trying to make a Kirby 3 site render in my localhost set up on Mojave (10.14.2). What am I doing wrong?

The project is located at `/username/sites/my-kirby-project`.  
Visiting the URL `http://localhost/~username/` with Chrome displays a list of all the containing folders, which is nice, but when I visit `http://localhost/~username/my-kirby-project` the website is not rendered in the browser, instead it shows the index.php code.

I figured it might have something to do with the .htaccess and “RewriteBase /”, but nothing I tried worked.

Circumstances that might or might not be relevant:

- i followed [these instructions](https://www.dyclassroom.com/howto-mac/how-to-install-apache-mysql-php-on-macos-mojave-10-14) to set up the localhost
- MacOS Apache Version 2.4.34
- `sudo apachectl configtest` returns `syntax ok`
- PHP Version 7.1.19

So, does anyone know, where I messed up?  
Thanks!

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [January 20, 2019, 6:31pm UTC](https://forum.getkirby.com/t/kirby-site-not-rendering-in-localhost/12281/2 "2019-01-20T18:31:19Z")

</div>

We do not recommend running it with the preinstalled php/Apache server. This has caused a bunch of problems for other users before. Do you have the option to use Mamp or Valet+?

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [January 20, 2019, 6:34pm UTC](https://forum.getkirby.com/t/kirby-site-not-rendering-in-localhost/12281/3 "2019-01-20T18:34:28Z")

</div>

Maybe this helps?

> [@Template Pages Not Found](https://forum.getkirby.com/t/template-pages-not-found/12175/25):
>
> @rainerth If you use the built-in server, you have to call it with the router: php -S localhost:8000 kirby/router.php We do not recommend using the built-in server anymore.

---

<div class="post-metadata">

**Author:** ![jensschnitzler](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jensschnitzler/32/5999_2.png) [@jensschnitzler](https://forum.getkirby.com/u/jensschnitzler)\
**Post date:** [January 21, 2019, 6:14pm UTC](https://forum.getkirby.com/t/kirby-site-not-rendering-in-localhost/12281/4 "2019-01-21T18:14:31Z")

</div>

Thank you very much for your quick response!  
I tried it with Mamp and the same error ocurred, but I stumbled upon this thread, which happened to present my solution: [mac - MAMP PRO won't execute PHP files? - Super User](https://superuser.com/questions/591830/mamp-pro-wont-execute-php-files)

I’ll quote it here:

> Fixed it. Turns out I had an .htaccess files in the parent directory, with the following line in it:
> 
> AddType x-mapp-php5 .php
> 
> Removed the file and now PHP executes properly. I guess I don’t need to have this .htaccess file on my local machine.

🥳
