Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Goto page: 1 - 2 [+1]

Bottom
Upgrading Your Site Made Easy
  • Posted: 28.12.2002, 06:45
     
    Infopro
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    17.06.04
    Posts:
    2122
    I'm not sure how many of you know of this, or even have it on your server to use, as some hosts I believe don't allow it, but if you have a link on your control panel on the server your site is on, there's a very easy way to upload and install the newest release of PostNuke.

    I'd like to go thru the whole thing with you here from start to finish as I believe that once you read this, you may just find yourself with a lot less time wasted, less files possibly being corrupted in transfer, and your site being down for as minimal of time as possible, which is a good thing.
    You already know how to upload files and get PostNuke working I'm sure, this little explanation will cover two things.

    Working via an SSH session
    Upgrading your sites files and directories.


    Using SSH;
    OK, so you see that you have SSH on your server and want to try using it, well once you try it once you'll wonder why you haven't always used it. Those that do? Know what I mean.

    First, let's create a directory on your server called temptar. You can name it whatever you want, but a name like this will be easy to remember.

    Second, upload postnuke-phoenix-0.7.2.3.tar.gz to this new directory.
    Uploading on my DSL line takes about 2 minutes.
    By the way, you can rename this to whatever you want to as well. I'll rename this file to pn.tar.gz for this tutorial.

    Third, click the link in your hosts admin panel that says SSH to start, and up will come a terminal window (pop-up) like this;

    http://mswebdesign.com/fun/firstview.gif


    Once you are in, first thing to do is hit enter key, you'll get a login: prompt, type in your username there and hit enter again. You'll get a confirmation message saying
    "Host was not found in preinstalled known_hosts file,continue anyway?" Click yes.

    *you may see a message that says "File operations disabled, server can't be verified"
    Right under that, it asks for your password, type in in and hit enter once again.
    You are now logged in and ready to go to work.

    Type in cd public_html and hit enter it will seem like nothing happened. But you just changed directories.
    By typing in ls, you'll get a list of all files and directories in public_html.
    Your in public_html right now, we need to get to temptars, that's the directory we made earlier and uploaded the tar file to? OK, so type this cd temptars and hit enter. You'll know your in the right place by typing in ls again. It will show you what's in there, which right now is only the pn.tar.gz tarball.

    We need to get this unpacked now that we've navigated to it. So type in this command;
    tar -zxvf pn.tar.gz and hit enter, this will unpack the file, it will list everything it unpacks for you. Easy huh?

    Now, go to your FTP client, and look inside the temptars directory, you'll see a new directory named postnuke-phoenix-0.7.2.3 in there. {remember, we renamed the tarball, but this postnuke-phoenix-0.7.2.3 directory is inside of it)
    http://mswebdesign.com/fun/ftpview_after_unpack.gif

    That's it! You've just unpacked your first tarball. 2 minutes to upload it, give or take another 2-3 minutes depending on you typing in the commands properly to unpack it, and your done. Let's move on to upgrading your site now.

    Upgrading PostNuke itself;

    Some people suggest you simply overwrite files during an upgrade, I don't go by this method, as I'd like to keep my site intact in case of a problem, I can revert back to the installation that was working fine.
    So although I am sure there are other ways to do this, here's my tried and true way to do it that works for me.

    First, backup your SQL database for the site. You may have an option for this in your hosts control panel as I do, or you may need to have phpMyAdmin installed which will work great as well. Here's how you would go about it with phpMyAdmin Ver. 2.3.2
    Open your browser to the welcome page of phpMyAdmin and look to your left, you'll see your database(s) listed there in a dropdown menu. Click the appropriate DB. Once you do that, on the window to the right, you'll see some "buttons" across the top, click Export. On the page that opens, you'll see a window with all tables listed, and some options to pick from. Since we're doing a backup right now, we'll only deal with that.

    Click the "select all" link which highlites all tables inside that box, then click the radiobutton for "Structure and data" and click the other radiobutton that says "Save as file" and then Hit Go!

    http://mswebdesign.com/fun/sqldump.gif
    You've just backed up your entire database in less than 2 minutes.

    Second, go to your pnSite's admin panel, and set the default theme to PostNuke, this should help prevent any problems you might encounter with a custom theme not working correctly after the upgrade.

    Third, We need to move out your old site to make way for the new one, this is easier than it sounds.
    If all you have in the directory that contains your PostNuke site is the site itself, this will be very easy, if you've got other files and directories in there, you'll need to pay close attention as you prepare to move them all.

    We'll need the config.php file during the upgrade process, so download it to your computer locally for right now.
    In your root directory, (same place we made the temptars directory earlier?) make another one called something you'll remember like backup_site or whatever suits you.Navigate back to where the sites files and folders are all located and let's get ready to move them all out.

    If you unpacked the tarball locally, you'll see the files and directories in the HTML folder that you need to know the names of in order to move then all at once. On your server, via your FTP client, you want to click them all once by one, holding the control key so that you can highlite multiple files and folders at once. Click each and every file and directory associated with PostNuke making sure they all stay highlighted, and then right click any of them and choose move, or copy depending on your client of course.
    Once you've done this, navigate to the new directory we made earlier called "backup_site". In there, you right click again and choose paste. Shouldn't take but a few seconds to move it all over there. You've just removed your entire site, it will no longer work at this point.

    Navigate back to the "/temptars/postnuke-phoenix-0.7.2.3/html/" directory we unpacked to earlier and do again what you just did. Highlite ALL files inside the "HTML" directory, and choose copy, or move. Navigate back to where your site was located and choose paste. That's it.

    Remember the file we downloaded earlier called config.php? Rename that file now to pn7config.php and re-upload it into the same directory where the new files are. Right click config.php file on your server and choose chmod, set the value to 666 also do the same with config-old.php. Now let's run the upgrade script, point your browser to www.yoursite/install.php
    and your on your way.
    You'll need to know the database username, the database name, and the database password to upgrade. so have these ready.
    Choose upgrade to the latest version listed, do not check the box create DB since we already have one, and your site should be upgraded with a few clicks of the mouse.
    At the end of the install, you'll want to go back and re set chmod on the two files mentioned earlier to 644 and you'll want to delete the install.php and install directory itself.

    Now, your site's back up, seems to be working, but your missing your custom images and a few other things like certain 3rd party blocks and modules, themes and so on.
    We need to navigate back to the "backup_site" directory and go to the images directory inside it and highlite all images, navigate back to your new installs images directory and choose paste. All images now will work as before.
    Go to your "old" modules directory, highlite the modules you know that you've added such as a forums module for one example, go back to the "new" modules directory and paste it in there. You'll need to look in the "/backup_site/includes/blocks" directory as well for other things you may have added before, and move files back over from there too.
    Once you do this for all of the modules you had previously installed, you'll want to go to the modules section of the admin page and re generate the list there. Any modules listed that say "remove" because files are missing, don't click remove, unless you want to, this is another way of seeing what still needs "moved back in" from your old install.

    Well, that's it. Not too tough and if you were to time this procedure from start to finish, it should really take less than 20 minutes tops.
    The ideal situation being, all files all still on your server, you've only uploaded one tarball back at the beginning of this, and the config.php. The rest are already there, you just need to go thru and move back in what's missing from the new installation. I suggest you leave the "backup_site" directory there until you are SURE you don't need it, and even then a backup of it locally before you delete it to save space on your server, is a wise idea.

    Hopefully, this will take some of the worry out of upgrading for you, and that you'll see it's not only easy to do, but actually kinda fun, and can be done on most sites very quickly. :)

    I'll update this or make any corrections to things I may have left out as needed.

    --
    Friends rock, bullshit walks
  • Posted: 30.12.2002, 13:18
     
    Grizzly
    rank:
    Professional Professional
    registered:
     October 2002
    Status:
    offline
    last visit:
    09.09.04
    Posts:
    597
    Great post Infopro!
  • Posted: 31.12.2002, 09:31
     
    Infopro
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    17.06.04
    Posts:
    2122
    Thanks Grizzly. I hope it helps someone at some point. :)

    --
    Friends rock, bullshit walks
  • Posted: 05.01.2003, 21:26
     
    SWEDEN4
    rank:
    Freshman Freshman
    registered:
     November 2002
    Status:
    offline
    last visit:
    23.07.03
    Posts:
    40
    Yes very good information - just what I´ve been searching after. I´ll print this out!

    Thank you!

    SWEDEN4
  • Posted: 05.01.2003, 21:42
     
    SWEDEN4
    rank:
    Freshman Freshman
    registered:
     November 2002
    Status:
    offline
    last visit:
    23.07.03
    Posts:
    40
    By the way I use a thing called PuTTY to connect to my server using SSH. I´ve been looking in PuTTYS manual but I´ve yet not found a description on different commandos I can use for certain things. Is there a page some where I can look in to and get a clue on some commandos I can use when using SSH...
  • Posted: 06.01.2003, 17:16
     
    coolguy
    rank:
    Helper Helper
    registered:
     October 2002
    Status:
    offline
    last visit:
    05.11.04
    Posts:
    134
    Hi Infopro,

    You have given an excellent tutorial.
    You made many lives better here, it is true. :)

    Congrats and heartful thanks for the great simple TUT again.

    Thumbs UP,

    COOOOOOOOOOOLGUY.....
  • Posted: 07.01.2003, 18:38
     
    Infopro
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    17.06.04
    Posts:
    2122
    Hi guys, glad you like it. ;)

    For a list of commands, simply type in "help" or "?" that should give you all you need. Good luck to you..

    --
    Friends rock, bullshit walks
  • Posted: 14.02.2003, 20:47
     
    diablokid
    rank:
    Softmore Softmore
    registered:
     February 2003
    Status:
    offline
    last visit:
    08.05.03
    Posts:
    56
    Infopro, could i email you or you email me, i have a question,thnaks



    matt@hideinmy.com
  • Posted: 15.02.2003, 15:31
     
    Infopro
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    17.06.04
    Posts:
    2122
    Well, you could, but doesn't that defeat the purpose of the forums here? Or at my site that I setup for those that ask me personally for help with their PostNuke site?

    It's your call, I'll answer if I can.
    If I do have the answer, and I reply to you privately, who learns other than you?
    :wink:

    --
    Friends rock, bullshit walks
  • Posted: 19.02.2003, 18:56
     
    Researcher
    rank:
    Freshman Freshman
    registered:
     July 2002
    Status:
    offline
    last visit:
    19.09.06
    Posts:
    10
    I am having trouble getting started and I am hoping you can help me. The article seems to be very informative. My site does not have a SSH option when I am in the Admin, but I must use a program called Putty.

    How does the explanation of SSH differ for this utility?

    My hosting site is Hostnuke.com

    Any guidance or help you can give would be greatly appreciated.
  • Posted: 20.02.2003, 04:34
     
    geekster
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    06.09.05
    Posts:
    763
    Great job Chuck!

    Wish I'd seen your post earlier - just spent quite a bit of time typing up a response to a user regarding phpMyAdmin when I could have simply referred him to this thread! icon_redface

    Warm Regards,
    -=dave=-
  • Posted: 22.02.2003, 17:22
     
    Infopro
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    17.06.04
    Posts:
    2122
    Thanks Dave. I know what you mean. I've done a few repeats of explainations as well, and that was the idea behind this thread.

    I would LOVE to have 50 more threads just like this concerning other issues, so that we could refer new pnUsers to. ;)

    --
    Friends rock, bullshit walks
  • Posted: 07.03.2003, 00:11
     
    rcillig
    rank:
    Helper Helper
    registered:
     February 2003
    Status:
    offline
    last visit:
    14.10.03
    Posts:
    109
    this is for upgrading not moving your site to another host correct?
  • Posted: 07.03.2003, 07:34
     
    Infopro
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    17.06.04
    Posts:
    2122
    Yes that's correct.

    --
    Friends rock, bullshit walks
  • Posted: 19.05.2003, 07:00
     
    dp2
    rank:
    Softmore Softmore
    registered:
     December 1969
    Status:
    offline
    last visit:
    18.05.08
    Posts:
    87
    Great tutor!

    The upgrade on the install.php is proving to be problematic. I get errors like Unable to update nuke_hooks, Unable to update nuke_banner etc

    Nothing else happens

    I'm upgrading from 7.0 and the last time I upgraded I had to do this manually which is the reason why i'm trying to avoid the task if the upgrade script works there would never be an issue here.

    My question is do we jump to the version we are upgrading from and what to do with the error messages.

Goto page: 1 - 2 [+1]

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula