Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Moving local install to live server


Go to End


2 Posts   1485 Views

Avatar
purtle

Community Member, 11 Posts

29 September 2016 at 5:44pm

Hi

I have a local install on my wamp server with the path:

www/beta/abc/001

I have moved this install to the live server with the same path structure:

/beta/abc/001

When I browse to mydomain/beta/abc/001 , I get a 'server error' page - I can't access /admin either. Interestingly the base tag is still referencing localhost??

The RewriteBase '/beta/abc/001' in my htaccess is still the same, so everything should work as the path is still the same. I have also created a new db and imported the data from my local db and updated the settings in mysite/_config.php

The only other way is doing a fresh install on the live server into the sub directory and start again, but I would like to avoid this if possible.

Thanks
Grant

Avatar
matlak

Community Member, 4 Posts

9 November 2016 at 1:27am

Edited: 09/11/2016 1:28am

Hello,

RewriteBase should be related to URL in your browser. For example if URL is http://localhost/myProject/ then RewriteBase should be equal to '/myProject'.
When you move to PROD and URL is similar to http://myproject.com/myProject/ - leave RewriteBase untouched. Of course if live site URL is like http://myproject.com/ - you should adjust RewriteBase to '/' - works for me.

Probably you've uploaded your project with some cache files etc. If so, log in via SSH (putty for example) and flush cache from terminal level.

cd /path/to/your/project;
php ./framework/cli-script.php dev/build "flush=all";

should do the trick :)