BIP KB:
How to update Joomla! 2.5 to the current version (3.4.x)

Article By rita01


img

update joomla new version

Introduction to Joomla

Support for Joomla Version 2.5 ended at version 2.5.28 on December 31, 2014. It is vitally important for you to upgrade your older Joomla! 2.5 site to the current version of Joomla! (Version 3.4.8) to ensure that your site stays secure and its add-ons remain compatible. Joomla! 3.x is a totally re-written script that streamlined the core code so it would run more efficiently, provide fewer opportunities for hackers and web bots to attack sites and greatly enhance native Joomla! features such as permissions and groups, mobile device support (called responsive websites), native use of modern coding tools such as Twitter Bootstrap to speed development and aid in stability, and support for modern layout tools such as LESS CSS, jquery and high-resolution graphics on retina screens.

So, how does one go about moving from Joomla 2.5 to Joomla! 3.4.8? It takes planning to assess which extensions will require replacement versus upgrading, how permissions and groups will work on the new platform, whether the current template is worth retaining (can be made responsive for reading on mobile devices) and a great time to review the goals and success of your content and how it is organized. The easiest way to migrate from the older Joomla! to the current version is to install a clean copy of Joomla! 3.4.8 that includes the new template with its possibly changed module positions and features in a sub-directory and then install an extension that copies the database tables from the old version of Joomla! to a new database in the clean new version. One important issue you have to consider before you install Version 3.4 is whether your web host can support this new content management system. Please be aware of the following technical requirements:

  • PHP Version with Magic Quotes GPC set to Off: At least version 5.3.10 but if you use Akeebabackup you'll need PHP Version 5.5
  • MySQL (InnoDB support required): Version 5.1 at a minimum but it is strongly suggested to be running Version 5.5
  • Apache (with mod_mysql, mod_xml, mod_rewrite and mod_zlib): Version 2.4 or higher
 

Installing Joomla 3.4

These Joomla installation instructions assume that you are using a graphical user interface (GUI) such as CPanel to perform file management and database management.

  1. Log into CPanel and find the tools for managing databases. Click the MySQL Databases icon.
  2. As shown in Illustration 1, give your database a name under the Create Database tab. When using CPanel, the database name will always be prefixed by the home directory name separated by an underscore.
  3. If this is not your first database and you wish to reuse a username you can opt to only create the new database and attach an existing username to it. Click the button that says, "Create the Database."
  4. You will see your new database in the list of Current MySQL Databases. Click the link, Assign New User.
  5. In the resulting pull-down list of existing usernames, select the one you wish to attach It is smart to use your original username from your current live website. You are going to need it's password which can be retrieved from the Configuration.php file of the old live website. Click Add User. You can assign privileges to any user by clicking the pencil (Edit) icon next to the database.
  6. If you need to create a new username, you can do it in one of two ways: click the Create User tab and enter a username. Make sure it is no longer than seven characters. When using CPanel, the username will always be prefixed by the home directory name separated by an underscore; or while still in the Create the Database tab, click the Create the Database and Add New User" button. In this case, the system will shift to the Create User tab and indicate a second step. Enter a username as you did earlier.
  7. In either option, enter a password of at least eight characters containing upper and lower case letters, numbers, and punctuation. If you are working on a PC, do not use the back slash or colon. Write down or use a password manager to remember the username and password as well as your database name.
  8. Click the button that says, "Create User and Select Database."

Installing Joomla on a VPS Server

Illustration 1: The MySQL Database screen

One of your critical decisions in migrating your old Joomla! site to a new version is whether to retain the original template. If the template was hand-coded, you will need to update the code to add media queries listing the different sizes and behaviors of the many different mobile devices and their browsers. All media query code is CSS and uses the tag @media. You can find the code snippets for most mobile devices on this website: https://css-tricks.com/snippets/css/media-queries-for-standard-devices/. For example, shown in Illustration 2 is the CSS for adding responsive code about the current Apple iPad. In addition, Joomla! Version 3.4 uses modern javascript and supports CSS3 and HTML 5 enabling you to vastly expand the features and performance of the template. Re-designing templates for use in Joomla! 3.4 is beyond the scope of this tutorial, but you can find information about creating custom templates here: http://www.inmotionhosting.com/support/edu/joomla-3/create-template. Design the look and layout of the template using Adobe Photoshop and convert the layers to HTML and CSS.


 add a modern Apple iPad to your responsive CSS


Illustration 2: The Media Query code to add a modern Apple iPad to your responsive CSS


It is much simpler to use an off-the-shelf template and customize it to match your current template. A good site to identify appropriate templates by many different developers is Best of Joomla. You can search by category, compatibility, price, and developer. When you have identified your template, go to the developer's website and purchase either a subscription to the site or the individual template. Most developers provide a package that includes the database tables as well as the template code along with their development framework and Joomla! 3.x that you can download for installation. For ease of use, aesthetics, lean code and price, I like the following template developers: Shape5.com, Joomla51.com, Pixelpointcreative.com, RocketThemes.com and Gavick.com. Under the Web Tools, select File Manager and in the resulting display of the contents of the folder called public_html, upload the .zip file containing the Joomla! 3.4 package. Select the package file and click the Expand icon on the top menu. Next, follow these steps to install a new instance of Joomla!.

  1. Type the domain and folder name where you uploaded the package into a new tab on your browser.|
  2. In the resulting Joomla! installation screen, fill in the name of your website and give it a one sentence description that will go into its metadata. Then, enter an email address that is used to contact the person who manages the website, a username for Joomla! administrator and a password. Make sure that the Administrator username is unique, such as a portion of the website name plus admin.
  3. Click Next.
  4. In the resulting screen shown in Illustration 5, enter the information you created about the database. Notice that for security, the database prefix is no longer defaulted to jos_.
  5. Check over your entries in the next screen as well as whether your server fulfills all the PHP setting requirements to ensure a secure installation. If everything is green and you've set up the system to send you your login information, click Install.
  6. The last thing to do is delete the Installation folder.
  7. Log in to your Administrator back end by selecting it on that last screen.
 

Importing Your Contents

When Open Source Matters' development team upgraded Joomla! they completely rewrote the database configuration and supporting core code. Therefore, your Joomla! 2.5 database is incompatible with the new installation you just completed. However, its contents is totally usable and just has to be imported into the correct tables for use. Luckily, developers have provided a really nice set of tools to assist you in performing the task of importing users, user groups, permissions, menus, articles, and categories into your new database. My favorite extension to perform this task is made by  Kainotomo and called SPTransfer. You can purchase the extension for approximately €37 at http://www.kainotomo.com/store/sp-transfer. When you first log into the Administrator of Joomla! 3.4, you'll notice that they streamlined the screens and provided several access points to different types of settings. On the left, are links to Options settings for configuring the website and software. On the top menu are the sections where you can access settings for Users, System, Articles, Components, Extensions, and Help. Some of the settings' locations have changed such as Categories are now under Articles and all of the installation and extension managers are located under the Extensions tab along with the Media manager. The first thing to do is to ensure that your version of Joomla! is updated to the most recent version. Joomla! 3 provides an automatic updater that informs you about the status of your installation. If you get a notification at the top of the Administrator's screen that your installation is out of date, click the provided link and Joomla! will download and install the update. As of the publication of this article, Joomla! is running on Version 3.4.8 and has just announced the availability of Joomla! 3.5 beta. To import the contents of your old database into your new one:

  1. Install SPTransfer using the Extension Install Manager located under the Extensions menu.
  2. Click the Components menu and select SP Transfer. As shown in Illustration 3, SP Transfer displays a screen that allows you to select core Joomla! features to transfer from the database you set up using the Options button's screens and tabs. You will need to know the username and password for your old currently live website's database to run SP Transfer. You can get this information by opening the Configuration.php file.
  3. Carefully select a minimal number of Joomla! features to transfer at one time so you can control for errors such as replicating existing contents. I typically move all the Users information first, then the Articles and Categories, and finally menus. The modules will be different if you switched templates. It is easier to set up their contents manually after you migrate the rest of the information.
  4. If you are running specialized extensions that maintain their own core information separate from Joomla!, such as K2 or a blog, you'll need to use the Database area of SP Transfer to move actual records over. You must install these updated extensions before you migrate contents.
  5. Click the Database Transfer link on the left side. It will display tables from your original database. Carefully review these tables and find the specific ones for the extensions you wish to migrate. Concentrate on contents and categories because you can manually set up the remaining configuration options rather than risking migrating incompatible information. Do each extension separately.
  6. Check in the Components menu to see if you successfully migrated such things as K2 articles and categories, forms and blogs and their categories.

SP Transfer joomla

Illustration 3: Use SP Transfer to migrate your contents from your old site to your new site.  

Finalizing Your New Website

You will need to configure the new template with your website's logo, color scheme, front page layout, and indicate which menu items display specific modules using the Template manager. I use an application called Color Schemer Pro to copy colors from images and create a palette for every website. The application allows me to enter Hexidecimal IDs for each color used on the site. You also need to move the contents (or copy which is safer) of the images folder of the live site to the images folder of the new site.

The easiest way to do this is to use an FTP program. It's login is the same as the one you use to access cPanel. FTP will display all directories back to public_html so you can copy the images.

Also check the old templates folder for images such as the logo because each template handles logo placement differently. Check to see if there are any overrides in the old template's HTML directory such as for K2. Overrides are an efficient way of changing the configuration of components without disturbing the original information. Copy the overrides from the old template's HTML file to the new one.

Test every portion of the website to ensure that it displays properly on every type of device and browser. Make sure that modules appear in the proper locations and behave the way you want them to. You can enhance your new template by making use of its jquery-based module extensions that perform overlays, sliders, carousels, modal displays, and other animations not available in Joomla! 2.5.

When you have tested every portion of the site, you can take it live. First, make a backup of the old site by logging into it's Administrator and running Akeebabackup. Then, using FTP, carefully move the old site into a folder. Make sure that no portion of the old site remains at the root directory (public_html). Move the entire contents of your sub-directory containing the new website to the root.

You can also run a backup of the new site using Akeebabackup and restore it at the root. Open Configuration.php on the new site and make sure that its directories point to the root rather than any sub-directory you used to build the site.

You will need to log into Google Webmaster Tools and re-register the site, collect your Analytics ID and re-install its javascript or ID into the new site, upload new site map xml on to the server (you can install an extension such as JSitemap to automatically perform all of these tasks). JSitemap is $49 and can be purchased at http://storejextensions.org/extensions/jsitemap_professional.html.

When everything works, your new site will be automatically updatable through Administrator.  




Tags: , , , , , , , , , , , , , , , , , , , , , , ,

Spin up a VPS server in no time flat

Simple setup. Full root access. Straightforward pricing.

DEPLOY VPS SERVER

Leave a Reply



Feedbacks