{% extends 'partials/base.html.twig' %} {# Inlined to avoid a Twig namespace lookup; sized via .mg-rocket / .fa-rocket compatible CSS so it drops in wherever the FA rocket icon was. #} {% set rocket_svg %}{% endset %} {% block titlebar %}
Help

{{ rocket_svg|raw }} Migrate to Grav 2.0

{% endblock %} {% block content %}
{% if migrate_grav_security and not migrate_grav_security.protected %}
Security: the user/data, user/accounts, user/config and user/env folders may be downloadable over the web. {% if migrate_grav_security.apache %}

On older installs these folders are only protected by file extension, so certificates, keys, tokens and databases stored under user/data can be fetched directly. Grav 2.0 blocks them outright — apply the same fix to this site now.

{% if migrate_grav_security.can_autofix %}
{% else %}

The site root .htaccess is not writable, so this cannot be fixed automatically. Add this rule to it inside the <IfModule mod_rewrite.c> block:

{{ migrate_grav_security.snippet }} {% endif %} {% else %}

This site is served by {{ migrate_grav_security.server ?: 'a non-Apache webserver' }}, which ignores .htaccess. Grav cannot fix this for you — add the equivalent rule to your webserver config and reload it:

{{ migrate_grav_security.snippet }} {% endif %}
{% elseif migrate_grav_security and migrate_grav_security.protected %}
The sensitive user/ folders are protected from direct web access.
{% endif %}
{{ rocket_svg|raw }}

Ready to move to Grav 2.0

Stage a fresh Grav 2.0 install alongside this site and hand off to a standalone migration wizard. Your current site stays untouched until you explicitly promote the new install.

{% if migrate_grav_state %}
A migration is already staged. Resume it in a fresh PHP process, restart the wizard from step 1, or reset to start over from scratch. The staged files live at /{{ migrate_grav_state.stage_dir }}/ and /{{ migrate_grav_state.staged_zip }}.
Staged {{ migrate_grav_state.created|date('Y-m-d H:i') }} from Grav {{ migrate_grav_state.source.grav_version }} by {{ migrate_grav_state.source.trigger }}.
Continue migration
{% else %}
Nothing is changed in your current site until you complete and explicitly promote the new install. You can abandon the migration at any time by clicking Reset on this page.
Stage Grav 2.0 in /{{ config.plugins['migrate-grav'].stage_dir }}/ and open the migration wizard in a fresh PHP process.
{% endif %}

What this does

  1. Downloads the latest Grav 2.0 release.
  2. Drops a standalone migrate.php file at your webroot.
  3. Saves the 2.0 release zip to tmp/ for the wizard to extract.
  4. Writes a single-use token to .migrating.
  5. Redirects you to /migrate.php — your browser leaves Grav 1.x entirely from this point on.

Prefer the CLI?

Run the same kickoff without the admin UI:

$ bin/plugin migrate-grav init
{% endblock %}