Silvestripe migration from and to a server

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version: 3.2.1

Question: Hi, I need your help. I’d like to know how to migrate the content of my site, that has been developed using Silverstripe 3.2.1, from the current server to a new one including database. Is there any guide that you can suggest me that explain how to move all datas from one server to another?
Thanks in advance, any help is really appreciated!

Details of your query go here

// Include any relevant code. If you have a lot of code, link to a gist instead.

It depends a lot on what level of access you have on your current server. The basic principle is:

  • Take a copy of all the files for the site… everything in the main directory, including any hidden files, etc.
  • Take a complete copy of the database
  • Upload the files to your new server
  • Create a database on the new server and import your data dump into that
  • Update the database credentials in your _config.php or _ss_environment.php file

The actual way you do this will depend on what tools you have available. It might be a case that you need to use FTP to download / upload all the files, and a database tool like phpMyAdmin for the database. If you have greater access, you may be able to use a tool like ‘sspak’ which will automate a lot of the process for you.

Thanks, I was able to migrate all datas from the current server to our local server. The location of my site is under the “www” directory. Now when i try to load the site it loads but return me an error: “server error” and I guess it is related to the database. Can you please tell me what’s the file where I can configure the database address? Sorry for the “stupid” question but I am a newbie with Silverstripe, first time ever! :slight_smile:
Thanks in advance for your help!

ok thanks, i’ll do it and keep you updated. Thanks for all the informations! :slight_smile:

All the configuration information like that is in the environment… so it’s either set up in the server configuration, or it will be in a .env file in the project root. If it’s not there, then you may need to make sure that you’ve transferred all the hidden files over from old to new.

Thanks, I looked but I didn’t find any env file. The only configuration file that has information about mysql is inside the “mysite” drawer that is inside the “www” drawer. The name of the file is “_config.php” and there i have the following path:

<?php error_reporting(E_ALL); global $project; $project = 'mysite'; global $databaseConfig; $databaseConfig = array( "type" => 'MySQLDatabase', "server" => '', "username" => 'username', "password" => 'db password', "database" => 'db name', "path" => '', ); // Set the site locale i18n::set_locale('it_IT'); MySQLDatabase::set_connection_charset('utf8'); //Director::set_environment_type('dev');

Yeah, that’s my fault… the _config.php or a file called _ss_environment.php would be right for the version of Silverstripe you have… the .env file would be for a version 4 installation.