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.

Installing SilverStripe

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

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

Copy site and data to new domain

Go to End

10 Posts   3923 Views


21 December 2008 at 10:09am Community Member, 224 Posts

Is there a way to duplicate a site and database to create a similar site with similar data?

In stead of starting over, I would like to download from the first site, create (restore ?) a database, upload the files and then modify the content. Is this possible?


21 December 2008 at 8:52pm Community Member, 712 Posts

=) Well, yes.. if you copy the files and the database to another server then you will have replicated the site.

Although, perhaps you would find the [url=]subsites[/url] module useful to create multiple sites from the same SilverStripe installation.


23 December 2008 at 7:10am (Last edited: 23 December 2008 7:12am), Community Member, 224 Posts

I understand that the files can copy fine. But I am having trouble importing the database from the first site - has a different user name.

Do I make a database first, install Siverstripe, then import?

Can I restore a database into a new user? If so, what about the install for silverstripe? Or do I not need to install then?

Any guidence as to the steps I would take to do this?

Step 1. Copy all files to new site (user)
Step 2. Make a backup of the database of the first site.
Step 3. ... ???

Thank you,


23 December 2008 at 8:41am Community Member, 712 Posts

If you're having trouble restoring your database with a different username, you probably need to [url=]look that up first[/url] - it doesn't have anything to do with SilverStripe.

But this should be whole process start to finish:

1. Create a dump of your database with mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]
2. Copy your SilverStripe files to a new host
3. Modify your mysite/_config.php file with your new database information
4. Restore the database on the new server with mysql -u [username] -p [password] [database_to_restore] < [backupfile]
5. Run /db/build?flush=1 and check for errors.


23 December 2008 at 8:49am Community Member, 224 Posts

Thank you, I will give it a try, but before I do, please pardon me for not understanding the code you are using.

mysqldump: Is this something I do from the address or inside phpmyadmin, or what?

Can I do what you are saying inside phpmyadmin?

mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]

mysqldump -u [abc] -p [123] [databasename] > [backupfile.sql]

mysqldump -u abc -p 123 databasename > backupfile.sql

Where do I do this?


23 December 2008 at 8:59am (Last edited: 23 December 2008 9:10am), Community Member, 224 Posts

Sorry, I forgot to click on the link you gave - I will go from there - Thank you

Ok, I do not have access to the server Shell as it is a reseller hosting account.

So I will need to use phpmyadmin... Any thoughts on that?


23 December 2008 at 9:13am Community Member, 712 Posts

Phpmyadmin Backup: [url][/url]

PhpMyAdmin Restore: [url][/url]


23 December 2008 at 9:38am (Last edited: 23 December 2008 9:43am), Community Member, 224 Posts

I got it.

I first made the database like always for SilverStripe
Installed SilverStripe
Uploaded my images files
Uploaded my theme

Export in phpmyadmin from original site...

Uncheck the "Add AUTO_INCREMENT value"
Export type - > REPLACE
Click GO

Import to new site...

Uncheck the Partial import option ??
Click GO

Go to Top