1

I have a Craft 2 installation that I'm upgrading to Craft 3.

I've got v3 running locally in its own virtual host, but now I need to temporarily put the dev v3 instance in the same hosting account as the live v2, with the v3 instance resolving at a dev subdomain:

account root
    craft              <-- v2 system
    craft              <-- v3 executable
    config … templates <-- other v3 dependencies
    public_html        <-- live web root
    dev                <-- dev web root

Given the naming conflict between the v2 system folder and the v3 executable, can I exclude the v3 executable and have v3 still run?

Or can I put all the v3 stuff in its own folder still above web root and then tell the dev index.php where to find it? It's not clear to me from the doc on customising directory structure that I can do that.

I know there is a doc on moving Craft files but that focuses on moving into web root (in my case, dev web root), which I don't want to do.

3

Both the craft/ folder name in Craft 2, and the craft executable in Craft 3, can be renamed.

Since the craft executable is user-facing (when SSH’d in), I’d recommend leaving that alone and rename your craft/ folder to something else, maybe craft2/. Then in public_html/index.php, update your $craftPath variable to point to the new location:

$craftPath = '../craft2';
  • Thanks Brandon. Obvious now you explain it [self facepalm]. – Jonathan Schofield Aug 14 at 8:38
  • Noting here for others that in Craft 2's index.php, CRAFT_BASE_PATH is defined as $craftPath. At least, it was in mine. – Jonathan Schofield Aug 14 at 9:57
  • @JonathanSchofield Doh, thanks! Just updated my answer. – Brandon Kelly Aug 14 at 14: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.