Skip to content

How to move your site

ninacoder-info edited this page May 16, 2021 · 7 revisions

If you are going to move your site to a new location, for example: change your hosting, domain name, enable ssl (https) on your site etc... Please follow our guide.

Step 1: move all your file to new hosting/domain.

Step 2: open .env (located at the root of the project) then edit your site url to the correct one (with or without https, www or none-www).

Step 3: (option) delete public/storage shortcut symlink, only do this if you are going to change hosting server.

Step 4: (option) redirect 301 from non-https to https by edit public/.htaccess remove the letter # from line 13 and 14.

Before

# Redirect from non https to https
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

After

# Redirect from non https to https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Step 5: Delete storage shortcut

Use FTP or cPanel file manager delete the shortcut link in public folder (not public_html, it is a folder named 'public' in project root).

So you have to delete public/storage (not storage folder at the root of the project)

Step 6: Login to your admin.

Click to Utilities (left sidebar) -> Terminal -> Other (button) -> select laroute:generate -> run

Click to Utilities (left sidebar) -> Terminal -> Other (button) -> select storage:link -> run

DONE

Clone this wiki locally