3

I just started a new position replacing a developer who left abruptly working on a project that is based in the Kentico CMS. I am completely unfamiliar with ASP and Kentico, so the answer here needs to be tailored for a total beginner. I am familiar with other languages (PHP, Ruby, SQL, etc.) but have no idea where to begin with this.

So, want I am wanting to do is copy everything from our production site (db and all) to my local machine so I can develop on it easier. I have already exported the db into an SQL file, and copied all the files in our Kentico Instance folder into github, and cloned it on my local machine. I assume since Kentico is already "setup," going through the installation process in their documentation is not the way to go about this.

Any help would be incredibly appreciated!

David Savage
  • 1,562
  • 2
  • 18
  • 35

1 Answers1

5

David, basically there are a few "pieces" to running Kentico locally. Since, as you mentioned, Kentico is already set up, you should have an easier go of it.

  1. A database with the necessary Kentico tables (it sound like you already have this)
  2. The codebase (all of the code files that you copied to github)
  3. A valid license for any domain you want to run Kentico on. Was the site already public facing? Do you know what licenses you have or can you log into the CMS Desk on the site that you copied everything from?
  4. Set up IIS for your local website. If you are unsure on this one I can explain further, but basically you need to add a new site, point it to the root code folder for your site, and set the domain to be a domain you have a Kentico license key for. You'll also need to change the app pool settings to "integrated" mode (most likely) and also set the appropriate version of .NET (if it's a recent version of Kentico you'll want .NET 4.0)
  5. Next you'll need to edit your hosts file to add the domain and point it to your localhost IP address. So add a line like "127.0.0.1 dev.yourdomain.com" or the equivalent.
  6. Edit the web.config file so that your code can connect to your database. You will need to edit the connection string accordingly to point to the database on your machine.

Once you have done these steps, your site should start to run just as it had before. I didn't give great detail on all of these pieces so let me know what problems you encounter so I can further clarify. More information about the current situation would also help.

One other note I would make: if you need the client to be able to review your work, it will most likely be more efficient and easier for you to leave the original database on the web server, and (if possible) connect to it remotely from your local machine. Since almost any change you make will result in a database change in Kentico, I find it much easier to be working on 1 database for development with distributed codebases. Otherwise you will probably need to overwrite the other database with your changes constantly and this can be annoying. If you leave the database on the server and just connect remotely, you can just ftp (or use git) to push files to the server that you have edited locally.

probrandono
  • 528
  • 4
  • 8
  • This is pretty much correct. I would like to add that if you don't have a local domain name Kentico (the company) is pretty good at supplying one if you ask. – lukek Dec 02 '12 at 23:11
  • 1
    Yes, if you have a serial number you should also be able to log into [client.kentico.com](http://client.kentico.com) and create free development keys for your domains, as long as the domains are clearly for dev (for example, dev.domain.com or domain.local, etc). Kentico will then review the licenses and approve them. Otherwise they will expire after 1 week. – probrandono Dec 03 '12 at 02:38
  • 1
    Sorry took me a while to get back to this. So far, I think I have almost everything setup. However, when I try to access the site in a browser I get a setup looking page that says "Step 1: Database Instance". I try to click next, as it's pointing to the correct db. However, when I do I get this error "Database schema 'dbo' does not exist. Current schema is 'dbo'." Any thoughts/help would be greatly appreciated. – David Savage Dec 10 '12 at 18:30
  • Also, if it helps any, I did a Backup of the db on my previous host, and did a restore of that db on the new host. It seems like that should copy the db exactly, but maybe it missed something? – David Savage Dec 10 '12 at 18:46
  • 1
    @david-savage, did you resolve this? Do you have the new database name and credentials in your web.config file in the root of the application? There is a "CMSConnectionString" node you should be able to edit in that file in order to set it up correctly. I'm not sure about that specific error you are seeing so it's difficult to troubleshoot. – probrandono Dec 19 '12 at 20:35
  • I've tried your steps without success. Maybe you can answer this question: http://stackoverflow.com/questions/29710560/copy-a-live-kentico-instance-and-its-database-to-my-local-machine – Shaun Luttin Apr 17 '15 at 22:45