How to push a simple Drupal web site from test to production

Now that I've re-done my web site, using the Drupal open source content management system, I am going to need to take the development version of my site and push those new features to the hosting provider that actually runs the live site. I have my basic web pages + my Transcode blog showing up on the Drupal-created web site's main page.

My next task was to try to push the web site live, onto my hosted web server. I had to learn how to create a MySQL database on the hosting company, which was easy to do but took a couple of hours to show up. I also wanted ssh access to my site, which apparently caused my hosting company to move my hosted environment to a different server; that also took a few hours to get going, but was relatively painless. I tried to connect to it after a few hours, and couldn't; I found out that I needed to create a new password for the ssh service to work (makes sense, no problem).

Once I did all that, a few hours later I was able to get to the site. Here were the basic steps I took:

- I took my whole web site's "htdocs" directory tree and made a tarball of it:

tar cvf website.tar ./htdocs

This is where my images, PHP code for Drupal + modules, and all my other content sits, at least the content that doesn't get stored directly into the database. (e.g., PostScript documentation that I store on the site for public download)

- I FTPd the tarball over to my hosting provider, just put it somewhere for the time being.

- I took a snapshot of my Drupal database using "mysqldump":

mysqldump -u myusername -pmypassword mydatabasename > databasename.sql

(note: no space between the "-p" and the beginning of the password string. Not sure why that was the case, when there is a space between the "-u" and the beginning of the username string.)

- I FTPd the databasename.sql file to my hosting provider as well.

- I logged into my hosting provider's site, went into the administration interface for it, and asked it to create a new MySQL 5.0 database. I gave the database the same name as I gave when I set up Drupal on my local site. I picked a username and password, then it was ready to go. I noted the hostname where that DB sits, because I need to use that later.

- I used ssh to get into my site. Once there, I unpacked the htdocs tarball:

tar xvf htdocs.tar

- I moved the htdocs directory to be a peer of my existing html directory (the top of the html tree for my existing web site; I'm going to replace that html tree with my new Drupal-based html tree). Now, typing "ls" I see the following

htdocs html

- I went into htdocs/sites/default/files/ and edited the "settings.php" file to make sure the setting for connecting to the database is correct. I needed to update the username, password, and hostname to make sure they all correctly use the production site's values. The line looks something like this:

$db_url = 'mysqli://';

- I moved the original html directory out of the way

mv html html.orig

- I moved the Drupal-based htdocs document tree into place

mv htdocs html

- I was then ready to test by going here:

The Drupal-based content showed up like a charm. Voila!

My first live site push with Drupal worked, no problem.

Next, I'll need to learn how to do site updates: I intend to do more web site development via Drupal on my local machine, using my test/development environment (using VirtualBox to run OpenSolaris as a guest OS, so that my whole environment sits in a single .vdi file that I can put on a USB stick and take and use anywhere I want to go, or copy it onto a DVD or anywhere, really). Anyway, once I make more improvements to my web site, I'll want to push them live, too, so I need to learn how to update an existing live site. I'm hoping that will be pretty easy.


That would be never easy for

That would be never easy for anyone to push a drupal website and publish that thing, if your website is UK Assignment optimized properly and the bugs in it are cleared then you should move forward and make that thing happen so that you can also have a experience of it.

I really appreciate your

I really appreciate your efforts in making the drupal website along with a good practice. This really needs a very good kind of knowledge and innovation. Same way i have made rushessay review blog and been looking forward to make it alive.

movie star planet hack online

You dont you try a new exciting game thats msp app ,this app absolutely free on android phones click movie star planet cheats and grab it now!!!!!!!!

Drupal is a fabulous CMS and

Drupal is a fabulous CMS and is particularly useful for engineers as it acts more like a structure than an out-of-the-container CMS. On the off chance that you have some PHP coding abilities then Drupal is an incredible framework to utilize.Flamingo Video

Its much informative and

Its much informative and interesting site for me. Because i wanna know about Drupal website. Actually i wanna know about Drupal from a long time ago and Now i have found it from your site.

Gucci did not alpha off big

Gucci did not alpha off big but in actuality had apprehensive ancestry and with time abound into the appearance behemothic that it is today.Buying a backpack online at acclaimed online shops

I would like to try this

I would like to try this steps. Thank you for sharing this useful idea here. - Fred Wehba

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.