Forum

Thread tagged as: Question, Installation, Configuration

Page in subfolder, creating new pages

Hi My perch installation is on the root directory. The page itself is in a folder (www.mydomain.ch/mywebsite). When I create new pages, they're always copied to the root, not into my folder. If I move them by changing the location, they loose connection to the masterpage.

How is the workflow for this case? Thanks a lot.

Ursula Volkart

Ursula Volkart 0 points

  • 4 years ago

Ok I'm sure there's a correct way of doing this, but I'll hold my head in my hands and tell you how I fix this issue.

In "/mywebsite/" add a "index.php" file... with a

<?php perch_content('remove later'); ?>

Visit the page: www.mydomain.ch/mywebsite

That will now create the subfolder so any additional /mywebsite/hello.php or /mywebsite/hello/ in the admin will show under mywebsite

you can then remove the "remove later" from the index.php and the admin

Hope that's what you were looking to do

Just as a side note if you're building a new website on some existing live hosting, you'll save yourself a lot of pain if you don't ever use this path "www.mydomain.ch/mywebsite" and use it as a sub domain instead I.E www.mywebsite.mydomain.ch. This way when you're putting it live you just have to move the files out of the subfolder, no re-adding the perch content.

Anyway sorry if i've got the wrong end of the stick

Thanks a lot Stephan! You've leaded me to a solution. So I have to base every new page as a subpage of this first page? It's working now with this.

The reason for the subfolder is, I'm testing a page for a client on my own domain. But it would also be the case, if I'm doing a relaunch of a running website.

You're welcome, In that case I would def install perch as a sub domain...

You'll need to reinstall perch on the sub domain url and you'll need to add the that as your development licence domain URL.

Good Luck

Ok, perfect. I reinstalled the whole page within a subdomain. Now, it's no more getting messed up. Thank you!