We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Installation

Creating a Staging Site

Hi guys

Any advice on the best way to create basic staging site from live - to test the upgrade from perch 2 -> 3.

Assuming: 1. Copy site files to staging site 2. Make a copy of the database 3. Update config file with new database details / staging key

Paul Amass

Paul Amass 0 points

  • 11 months ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Yup that's about it :)

Your license can have three locations added, local, staging and live so you can use the same key as long as your staging domain is entered in your account.

Ok thanks: 1. I copied all my files from www.glsescouts.org.uk to staging.glsescouts.org.uk 2. I've copied and restored the database to perch_staging

Although following errored as part of the restore - not sure if this is critical?

CREATE ALGORITHM=UNDEFINED DEFINER=`glsesc`@`localhost` SQL SECURITY 
DEFINER VIEW `All`  AS  select `perch2_resource_tags`.`tagID` AS `tagID`,`perch2_resource_tags`.`tagTitle` AS `tagTitle`,`perch2_resource_tags`.`tagSlug` AS `tagSlug`,`perch2_resource_tags`.`tagCount` AS `tagCount` from `perch2_resource_tags`
  1. Updated the config file to repoint the database

Result

Any help would be appreciated.

Diagnostics report
PERCH INFORMATION
Perch: 2.8.31
Production mode: Production (100)
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31)
DB driver: PDO
DB tables: perch2_blog_authors (1), perch2_blog_categories (2), perch2_blog_comments (0), perch2_blog_index (2026), perch2_blog_posts (82), perch2_blog_posts_to_categories (94), perch2_blog_posts_to_tags (0), perch2_blog_sections (1), perch2_blog_tags (0), perch2_blogs (1), perch2_categories (2), perch2_category_counts (2), perch2_category_sets (1), perch2_content_index (1122), perch2_content_items (671), perch2_content_regions (79), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (1), perch2_pages (86), perch2_resource_log (89), perch2_resource_tags (0), perch2_resources (190), perch2_resources_to_tags (0), perch2_settings (45), perch2_twitter_settings (1), perch2_twitter_tweets (34), perch2_user_passwords (3), perch2_user_privileges (37), perch2_user_role_privileges (61), perch2_user_roles (22), perch2_users (7), perch_blog_categories (2), perch_blog_posts (18), perch_blog_posts_to_categories (19), perch_blog_posts_to_tags (0), perch_blog_tags (0), perch_contentItems (75), perch_pages (63), perch_pages_navgroups (1), perch_pages_templates (1), perch_settings (16), perch_twitter_settings (1), perch_twitter_tweets (163), perch_users (9)
Users: 7
App runtimes:
<?php
    include(PERCH_PATH.'/core/apps/content/runtime.php');
    include(PERCH_PATH.'/core/apps/categories/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php');

?>
Editor plug-ins:
H1: 710990d34c85fe1fa3ac93e21cf5ef7a
L1: 7c1c707a437001a9700a0a20195fd9be
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
headerLinkColour: #000000
logoPath: /perch/resources/topbannermobile.jpg
linkColour: #333333
editorMayDeleteRegions: 0
latestUpdate: 1.8.4
perch_pages_folders: /about/ /adultsupport/ /communicate/ /contacts/ /international/ /programme/ /sections/ /useful/
perch_pages_editorMayDeletePages: 0
perch_blog_post_url: /communicate/news/post.html?s={postSlug}
perch_blog_editorMayManageCats: 0
headerScheme: light
dashboard: 1
perch_upgrade_v1_prefix: perch_
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
content_hideNonEditableRegions: 1
update_2.4.3: done
on_sale_version:
latest_version: 2.8.15
update_2.8.31: done
perch_blog_update: 5.0.1
perch_blog_site_name: GLSE Scouts
perch_blog_max_spam_days: 0
hide_pwd_reset: 0
content_frontend_edit: 0
perch_blog_comment_notify: 0
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: glsesc_perch
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: glsesc_perch_staging
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM: webmaster@glsescouts.org.uk
PERCH_EMAIL_FROM_NAME: Paul Amass
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/glsesc/staging.glsescouts.org.uk/perch
PERCH_CORE: /home/glsesc/staging.glsescouts.org.uk/perch/core
PERCH_RESFILEPATH: /home/glsesc/staging.glsescouts.org.uk/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_EDITORIMAGE_MAXWIDTH: 400
PERCH_EDITORIMAGE_MAXHEIGHT: 300
PERCH_EDITORIMAGE_CROP: 1
PERCH_DEBUG: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/glsesc/staging.glsescouts.org.uk/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS
PHP: 5.6.38
Zend: 2.6.0
OS: Linux
SAPI: litespeed
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.5.5-10.1.35-MariaDB-cll-lve
Free disk space: 453.94 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, litespeed, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imap, intl, json, ldap, exif, mcrypt, mysqlnd, mysql, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, shmop, SimpleXML, snmp, soap, sockets, SourceGuardian, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader, Zend Guard Loader, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 1024M
PHP max form post size: 1024M
PHP memory limit: 1024M
Total max uploadable file size: 1024M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PATH: /usr/local/bin:/usr/bin:/bin
TEMP: /tmp
TMP: /tmp
TMPDIR: /tmp
PWD: /
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-GB,en-US;q=0.9,en;q=0.8
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: cmsa=1; PHPSESSID=8kpgkbkc7hccp24vtsiigsosm4
HTTP_HOST: staging.glsescouts.org.uk
HTTP_REFERER: http://staging.glsescouts.org.uk/perch/core/settings/diagnostics/
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
UNIQUE_ID: W7h4OwXu6U4cJAQ1NI7dOQAAAAU
SERVER_SOFTWARE: Apache
SERVER_NAME: staging.glsescouts.org.uk
SERVER_ADDR: 91.238.163.175
SERVER_PORT: 80
REMOTE_ADDR: 95.147.79.154
DOCUMENT_ROOT: /home/glsesc/staging.glsescouts.org.uk
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /home/glsesc/staging.glsescouts.org.uk
SERVER_ADMIN: webmaster@staging.glsescouts.org.uk
SCRIPT_FILENAME: /home/glsesc/staging.glsescouts.org.uk/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 54807
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1538816059.2
REQUEST_TIME: 1538816059
argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

Although following errored as part of the restore - not sure if this is critical?

Was this outside of Perch? I'm presuming using mysqldump or some sort of database tool. You need to make sure you can dump and then restore the database without any errors. Once the restore is successful I think you should be fine.