Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Installation Folder/Site Folder Change

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 3155 Views
  • brb5548
    Avatar
    Community Member
    17 Posts

    Installation Folder/Site Folder Change Link to this post

    Hi,
    Has anyone attempted to move the installation folder? I installed SilverStripe under the a subfolder called site and now I would like to move all of the files to the root of my web site. Any one see why I could not simply move all of the files out of the subfolder and move them to the root folder?
    Thanks!

  • brb5548
    Avatar
    Community Member
    17 Posts

    Re: Installation Folder/Site Folder Change Link to this post

    I couldn't wait so I went ahead and moved the files over to the root of my webserver. I backed up .htacess and the /mysite/_config.php and re-ran the installation and then replaced these two backed up files and everything is back to normal.

  • jiipee
    Avatar
    Community Member
    7 Posts

    Re: Installation Folder/Site Folder Change Link to this post

    I'm also interested in this, what is the best or easiest prosedure to move whole site one folder up -> to the root?

  • contigo
    Avatar
    Community Member
    16 Posts

    Re: Installation Folder/Site Folder Change Link to this post

    "I'm also interested in this, what is the best or easiest prosedure to move whole site one folder up -> to the root?"

    To move an installation, but use the same database, here's what I did...

    0. backup old site
    1. create a new database
    2. do a fresh install in your new site, making sure it points to the new database. Then make sure site works as expected.
    2. copy [old dir]/themes/[your theme] to new site
    3. copy [old dir]/[site-specific dir e.g. "mysite"] to new site.
    4. copy [old dir]/assets to new site
    5. make sure your [new dir]/[site-specific dir]/_config.php points to your old database
    6. make sure folder and file permissions are correct
    7. run http://yoursite.com/?flush=1
    8. run http://yoursite.com/db/build?flush=1
    9. delete the database created in your fresh install.
    [edit] 10. If admin login doesn't work, delete records from members table in the original database. **
    [edit] 11. run http://yoursite.com/db/build?username=admin&password=password to reset user/pass to admin / password.

    ** Instead of #10-11 you could try using the ss "lost my password" link on the login page, but that didn't work on my local box.

  • Blackdog
    Avatar
    Community Member
    156 Posts

    Re: Installation Folder/Site Folder Change Link to this post

    you shouldn't even have to go to that much hassle.

    your config file doesn't contain any directory information. Unless you plan to change your theme or your project folder.

    check to make sure your RewriteBase in your htaccess file is pointing at the right folder and you should be fine.

    Another thing to check is your folders have retained their write permissions with the move.

    If you are moving the site from folder to folder on same host then the database will be fine.
    The only time you will come unstuck is if you have put absolute links to content in your site.

    remember to do a flush for good measure.

    3155 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.