Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverstripe - setting up a local copy of an existing site

I am new to silverstripe and webhosting and I think I do not understand what the workflow is. The situation is a as follows: There is this website http://foo.com which uses silverstripe. It is already installed and some content was added. However, I am now in charge of changing the design from the standard simple theme to a custom theme.

As this requires some testing and playing around, I surely do not want to do all changes online. I have ftp access to the website and can change all the files there (yay!). But I think it is most useful to have a local copy of the website, do all changes on my offline version and then upload the final new version to the webhoster (via ftp).

So my question is as follows: How do I get a local working copy of the website with all the silverstripe modules/themes etc. to my Ubuntu computer and can edit it just like it was online?

I thought there must be a tutorial for this, but I could not find the right thing for me.

If this is not the suggested workflow (download website as it is right now, do the changes offline with a working silverstripe installation on my computer, upload everything again) then please tell me how it is done right.

like image 936
Merlin1896 Avatar asked Dec 02 '15 20:12

Merlin1896


1 Answers

You can get a copy of Silverstripe working locally several ways.

Local setup:

  1. A Web server - Silverstripe prefers apache
  2. A Database

You can download a copy of silverstripe here: http://www.silverstripe.org/download/

When you have downloaded Silverstripe edit everything this is inclusive of the framework. The theme ( which you want to modify ) is located in a /themes/ directory you create a new directory with the name of your new theme and that's how you create a new theme. to switch your theme you can do this in the config file.

https://docs.silverstripe.org/en/3.2/developer_guides/templates/themes/

I would recommend following Silverstripes tutorials and lessons. Although the tutorials are deprecated they still have some helpful info, just remember they aren't always up to date.

https://docs.silverstripe.org/en/3.2/tutorials/

http://www.silverstripe.org/learn/lessons

Project workflow:

You asked how to manage changes between your local copy and your online copy.

This depends on your over all development set up you can do this a number of ways.

  1. FTP - Upload everything when you are happy with your changes locally.

  2. Version control - Use .git to manage your repository then use a script on the server to pull the repo when you push changes

  3. SSH - Log into your server remotely and edit your files online.

Any of these will work but they are your preference. I would recommend doing some more research on the repository route as it often ends up being the fastest in the future, however if you want something quick and dirty FTP is often a good choice.

like image 159
Daniel Tate Avatar answered Sep 24 '22 02:09

Daniel Tate