Forum

Thread tagged as: Question, Problem, Configuration

Missing content when moving perch site

I am working on moving a site to a new server, when i go through the process of downloading the DB and moving the files, some of the added content is visible and others are not.

current site: https://timmadigan.net/articles.php staging site: https://mattbtaylor.com/work/tim/articles.php

using the exact same DB.

Did I miss a step. The blog seems to be working, but non of the other content.

matt taylor

matt taylor 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You have moved it into a subfolder, so Perch has lost the path to all of the content.

/articles.php is not the same as /work/tim/articles.php - Perch will see that as a new page.

You could "fix" that by going into page options and changing the path to the page but then it would presumably be incorrect again when you go back to having the pages at the root of the site.

Good practice (and not just for Perch) is to not change the path from root, the way most people would do that is to have a subdomain that they stage sites at.

Okay, I see you're talking about changing the path in the DB tables? That seems to do exactly that. Yea i will make that sub domain after I upgrade to 2.0 on the new site. Thanks.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

You shouldn't need to change anything in the database tables. Move from root to root and all the paths will be correct.

Right, for a stage and dev site that makes total sense. Is there a standard way to work locally with the same data? When I export my DB and run it through MAMP I get that same issue. localhost:XXXX/site/

Hi Matt, I think you're getting the problem locally as that path is still in the subfolder "site". You can alleviate this by setting up a virtual host so the local domain is something like https://site.localhost

The method for this will depend on the software you are using. Try searching for "virtual host" + the name of the software you're using (e.g. MAMP, XAMPP). If you have MAMP Pro this is very easy using the "hosts" tab in the interface.

Here's a guide for setting things up in XAMPP.