Skip to content

2 Pi Install Upgrade Run SSL

Marco edited this page Nov 9, 2018 · 2 revisions

Pi Install

How to install Pi-Engine?

  • please check if your hosting meets the Pi technical Requirements
  • first upload the content of Pi-Engine code
    • /www directory into your webroot
    • /lib, /var, /usr directories outside the webroot (for security considerations it is highly recommended to put those directories outside your webroot).
  • go your www/index.php
    • it will detect the need of an install in case it is not done and launch the setup wizard for you
  • run the setup wizard
    • don't forget to choose the right cache system, according to the cache lib available on your hosting
  • at the end, don't forget to secure your installation
    • delete /setup
    • add chmod 444 on www/boot.php and www/.htaccess
  • if your forget this latest step, you'll have reminders in the admin dashboard

How to personalize your website

Now that your Pi Website is running, you need to

  • check / clean default user accounts
  • set system module configs
  • install a theme
  • install modules and set their configs
  • setup blocks and widgets to dress up your pages, starting with the homepage
  • add the first contents
  • enjoy !

How to run Pi-Engine with SSL / Https

  • If you set your certificate before installing Pi, there is nothing to do. the installer will detect
  • if you installed Pi without SSL certificate, here is what you need to do
    • edit /var/config/host.php : change Resource URIs ('www', 'upload', 'static') from http to https
  • add https to your GWT, as if it were a new site : you will monitor both (http and non https) Google Warnings, to check how Google handles redirections and indexation.
  • update your GA : edit profile and change to https (unlike GWT, keep the same profile)
  • update your sitemaps : delete the sitemap from old GWT, link sitemap to the new GWT and update your robot.txt
  • robots are indexing both http and https version : to prevent your SEO ranking from duplicate content penality, you need to block indexation of http pages. For that purpose
  • update your www/htaccess to add this rule (redirect all http calls to https)
# Rewrite for SEO purpose, manage SSL
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R=301,L]
  • you can check at any time how google handles your urls with a google search : site:www.yoursite.com or better in your GWT account
  • NB there is no need manage a redirection for robots.txt file (like below), the previous rewrite rule handles that for you and the robots
# Rewrite for SEO purpose, manage SSL
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R=301,L]
RewriteRule ^robots.txt$ robots-https.txt [L]

with a Rename robots.txt to robots-https.txt, and a new robots.txt with that content

User-agent: *
Disallow: /
  • NB : rel=canonical tag could be another solution, but rewrite rule with 301 handles that for you also

How to upgrade Pi-Engine to a new core version

  • always test the ugrade prior to production environment upgrade

  • make a full backup of your site files and of your db

  • download the pi package

  • from downloaded package, delete those dir or files (ensure the new distro did not change those)

    • www/setup
    • www/asset
    • www/upload
    • www/boot.php
    • www/.htaccess
    • www/favicon.ico ( Just if you have custom favicon.ico )
    • www/robots.txt ( Just if you have custom robots.txt , but need check by last version )
    • var/config/host.php
    • var/config/engine.php
    • var/config/service.database.php
    • var/config/... ( Check other config files if you have any change )
  • upload this modified distro to your hosting

  • update the core modules (system/profile/comment/etc.) from system/module admin

  • upload to usr/theme and usr/module the modified versions of your your theme and modules (in accordance with core changes)

    • for modules, update those from system/module admin
    • for theme, update theme in system/theme admin
Clone this wiki locally