Forum

Thread tagged as: Question, Installation, Hosting

Moving the Perch Installation

Hello,

A while ago, we installed Perch at outsidethelens.org/beta to build a new website with Perch. Now, we want to take the re-design live & move that site to the root of the domain and are unsure how to do so.

These are the two most obvious ways that I can think of to do it, please advise which is better:

Option 1: Keep the Folder

  • Leave the /beta folder in place.
  • Move all the individual .php pages from the folder to the root.
  • Go in to each page and change the Perch path to be /beta/perch.

Option 2: Move Everything

  • Change the Perch installation URL in the dashboard.
  • Move all the files to the domain root.

Which one of these is better? Would they break the installation?

Thanks in advance for your help!

Outside the Lens

Outside the Lens 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

We wouldn't suggest that you develop a site in a sub folder as all your paths from root are going to be incorrect.

As you have I would suggest physically moving the files but you will still need to go into each page and correct the path in Perch itself.

In the future I'd suggest staging your site on a subdomain and moving it wholesale to live:

https://solutions.grabaperch.com/development/how-do-i-move-a-perch-site

Rachel Andrew said:

We wouldn't suggest that you develop a site in a sub folder as all your paths from root are going to be incorrect.

As you have I would suggest physically moving the files but you will still need to go into each page and correct the path in Perch itself.

Absolutely, that was a mistake, but now that the site is developed there, we can't do anything about it.

Thanks for the advice!

I think developing in a subdirectory is a totally acceptable, normal, useful and convenient way to work. It's unfortunate that Perch "hardcodes" the full path to resources in the database instead of appending them at runtime (or time of template cache creation). But wordpress does it this way too, so it's not out-of-the-ordinary. In fact, there is a very useful script that is intended for wordpress but will work with any CMS, and it elegantly solves the problem of moving the site from one sub-directory to another (or up to the top-level of the domain). See my response here for details: https://forum.grabaperch.com/forum/08-12-2014-how-do-i-move-my-site-between-directories-on-the-same-server?page=1#reply-32322