I'm trying to get a dev environment set up and have got stuck.

I use Linux in the office and Windows at home. I simply wanted a basic LAMP stack to run craft on so I could develop locally. Given the two OSs, I figured I'd use Xampp.

I've installed Xampp on my Linux Mint PC. localhost seems to take me to htdocs, which I understand is normal? I've put Craft in htdocs, and then created a folder called public and put the index.php etc. in there.

So we have:

htdocs - craft - public - index.php

However, when I then do localhost/public/admin, I get Could not find your craft/ folder. Please ensure that $craftPath is set correctly in /opt/lampp/htdocs/public/index.php

My craft path is set to ../craft (i.e. the default)

I've had a google, and there do seem to be similar questions, but mostly on Windows.

Should I move everything up a level? Or am I doing something else wrong?

1 Answer 1


It might be easier for you to set up a local domain and access it via my-site.dev rather than localhost/public/admin.

Using xampp this is a bit of a manual process. You'll need to go into: xampp/apache/conf/extra/httpd-vhosts.conf and the following

## my site name Site  
<VirtualHost *:80> 
    DocumentRoot "D:/xampp/htdocs/my-site"
    ServerName my-site.dev
    ServerAlias www.my-site.dev
    <Directory "d:/xampp/htdocs/my-site">
        Order allow,deny
        Allow from all

The open your text editor with administrator rights and go to: c:\windows\system32\drivers\etc\hosts and add the following: my-site.dev

For an easier process to set this up use Ampps instead the gui is simpler and everything is automated. Though you may still need to open your hosts file with your text editor if you haven't set up ampps to run with administrator privileges.

I used to use xampps, but now much prefer ampps on windows.

  • Oops didn't mean to just post thanks! I'm working on both Linux and Windows, hence reaching for Xampp as something I could use on both. But chatting about it in the craft devops slack, Vagrant seems strongly recommended (and some kind soul has already built a box). So am probably going to switch to that. Oct 12, 2016 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.