Hi, I developed my first site with Perch. How do I now migrate the site from my local host to the server. It’s made with a test-licence. I bought already a licence which I have now to register to this website. Thanks for hints.

Migrate the developed site from local to the server
- christophfreyer
- Thread is marked as Resolved.
-
-
drewm
Approved the thread. -
See if this helps: https://docs.grabaperch.com/pe…w-do-i-move-a-perch-site/
-
Thanks for the link. Now I have got an big issue. For staging I used the database account from my hoster in the config. So I had to put whole the bunch (all files and the Perch-folder) on the server at https://mydomain/preview/customer.
For this I copied the pw, username and db-name which are fixed by my hoster into the config-file. As path for Perch I tried the define('PERCH_LOGINPATH', 'preview/customer/perch'); and also define('PERCH_LOGINPATH', '/perch'); but I still could not connect to the database.
I also can't login to Perch itself - it does not accept the user or the pw.
Hav you got any ideas where my mistake is? -
I also can't login to Perch itself - it does not accept the user or the pw.
What message are you getting? If Perch is rejecting your details then it's likely that they're just wrong. There's a different error page you'll get sent to if Perch can't connect to the database.
If in doubt, turn on debug so you can see what's happening.
-
I do get this debug message record
perch 3.1.4
SQL- SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_settings' doesn't exist
- SELECT * FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT regionKey, regionHTML FROM perch3_content_regions WHERE regionPage='/preview/faly/index.php' OR regionPage='*' ORDER BY regionPage DESC
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_content_regions' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- SELECT pageID FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1
- [0] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
- INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/preview/faly/index.php' AS pagePath,'Faly' AS pageTitle,'Faly' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-04-26 13:35:01' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/preview/faly/index.php' )=0 LIMIT 1
- Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table '1738315db1.perch3_pages' doesn't exist
-
Is 1738315db1 the name of your database?
Can you see the perch3_pages table within that database?
-
no 1738315db1 its the live-one. It should be 1117486db3 . I am using a switch
Code- define('PERCH_LICENSE_KEY', 'P3{redacted by moderator}');
- $http_host = getenv('HTTP_HOST');
- switch($http_host)
- {
- case('localhost') :
- define("PERCH_DB_USERNAME", 'christoph');
- define("PERCH_DB_PASSWORD", 'r2d2');
- define("PERCH_DB_SERVER", "localhost");
- define("PERCH_DB_DATABASE", "faly_db");
- define('PERCH_LOGINPATH', '/faly/perch');
- break;
- case('christoph-freyer.at') :
- define("PERCH_DB_USERNAME", 'sql3441754');
- define("PERCH_DB_PASSWORD", 'staging_pw');
- define("PERCH_DB_SERVER", "staging_server");
- define("PERCH_DB_DATABASE", "1117486db3");
- define('PERCH_LOGINPATH', 'preview/faly/perch');
- break;
- default :
- define("PERCH_DB_USERNAME", 'sql3750080');
- define("PERCH_DB_PASSWORD", 'live_pw');
- define("PERCH_DB_SERVER", "live_server");
- define("PERCH_DB_DATABASE", "1738315db1");
- define('PERCH_LOGINPATH', '/perch');
- break;
- }
I logged in to the server and opened the database - Now I can see the perch3_pages.
-
Have you checked that the value of getenv('HTTP_HOST') matches the values you're testing for. I suspect that it does not.
-
I tried it now without a switch and I got this debug-message:
get(): ">[30] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0 find_by_path(): "> [1] SELECT * FROM perch3_pages WHERE pagePath='/preview/faly/index.php' LIMIT 1 template_attributes(): ">Using template: /templates/pages/attributes/seo.html _get_content(): "> [12] SELECT regionKey, regionHTML FROM perch3_content_regions WHERE regionPage='/preview/faly/index.php' OR regionPage='*' ORDER BY regionPage DESC if I try to log into Perch there is this debug-message
get(): ">[30] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0 Queries: 1 Memory: 1.402 -
Do you get logged in?
-
in the database - yes, but at Perch no. If I take the pw and user of the database I get only a 404.
at localhost with xampp it works, but there I got naturally different configs.
-
Hi, is it possible, that I have to make a fresh install of Perch on the server and not to copy all the files? And afterwards copy all my files into it?
-
Yes, you could do that.
-
Thanks the site is running now in a subdomain. It was matter of path root-directory.