No content on site after moving from dev to production - urgent help please!

  • Hi,

    We just moved a site which was working fine on our dev environment to the production server and we have a big problem unfortunately. The dev site was in a subfolder /clients/etc which we moved up to the root for production. Then a simple database transfer and file copy plus config change that we've done hundreds of times successfully with other types of CMS. Not this time unfortunately.

    We can see the content in the live site admin but not on the front-end. Oddly in the database, we can also see two sets of path entries in the perch3_pages table - the expected path (root) but also the paths with the pages for the dev site in the subfolder. This seems rather odd and we're not sure what is happening there or how to fix it? Surely "hard" paths like that should not write to the database but be derived from a root url or similar somewhere in the config or admin?

    Grateful for some urgent guidance please as we cannot really revert back to the old client site due to some convoluted DNS updating.



  • drewm

    Approved the thread.
  • if you have duplicate pages in the database, Perch probably sees them as new pages and not having any content, or the content regions are empty. Your previous content is probably tied to the subfolder pages still in the database.

    1. Backup the DB.

    2. You could try removing the new non-subfolder pages from the database and then change the pagePath of each entry removing the subfolder, use something like:

    1. UPDATE `MySQL_Table` SET `MySQL_Table_Column` = REPLACE(`MySQL_Table_Column`, 'oldString', 'newString') WHERE `MySQL_Table_Column` LIKE 'oldString%';

    3. you'll have to check and probably do the same for any table that references the 'regionPage' column.

    4. No guarantees here. but if you're stuck and can easiy restore the database, its worth a try.

    5. I would recommend not developing in a subfolder in the future...for any CMS.

    6. Good luck.

  • Hi,

    Thanks for responding. We have fixed the issue but we had to do quite a lot of admin manipulation re-creating pages, deleting dupes and changing urls. Lesson learned but I have to say that this CMS is particularly unforgiving and quite clunky in this respect. Also too long to get forum help requests approved and posted :(

  • Hi,

    but I have to say that this CMS is particularly unforgiving and quite clunky in this respect

    The reason standard Perch is unforgiving when it comes to file paths is the very reason many web designers use it. Perch allows you to turn a static site into a CMS-powered one with ease relative to other options. For Perch to be able to do this, it has to know where the files are. If you move a file, Perch will see it as a different page.

    Key to its ability to be retrofitted to a static site, pages in Perch are file-based. That means when you create a new page within the control panel, a new file for that page is added to your site.

    Perch Runway serves pages dynamically from the database. So it may be a little more forgiving if you have to develop in a sub-folder, but this workflow is not considered a good practice and you should generally avoid it when possible.