10. Keeping Your Site Up-to-Date

Keeping both your Joomla! installation and the extensions that you have added up-to-date is an essential part of managing your site. The biggest security threat to any Web site comes from allowing the software on which it runs to become out-of-date. Fortunately, Joomla! makes it relatively easy to maintain your software.

Updating Your Site

You can expect there to be updates to Joomla! at least once every two months, although if you are using a long-term-support (LTS) release such as Joomla! 2.5, these may become less frequent as time goes by. Updates to LTS releases contain important bug fixes and security improvements in the event that a security issue is discovered. Updates to short-term-support (STS) releases generally contain more changes and sometimes new features because STS releases are in active development. Joomla! has a one-click update process that lets you keep up-to-date easily, though we recommend being more careful about updating than is required by that process. It is important that you keep your site up-to-date. If you get behind on updates, you can always catch up, but doing many updates at once means that you have a much more complex process behind the scenes even though it is still usually a one-click process.

The basic one-click procedure for updating will notify you that a new release is ready via the Joomla! Update link (in Joomla! 3) or icon (in Joomla! 2.5) found in the control panel. You can also go directly to the Joomla! Update component using the Component menu. In either case you will be taken to the same page, which will inform you if an update is ready. On most hosts you will be able to simply use the basic Install Update button, but on some hosts you may need to use a more complex procedure. We outline some of those procedures in Appendix A. Once you get the success message, you should check the Database tab in the Extension Manager. Normally you should have a message about the success of the most recent changes, but if the tab indicates that there are warning messages, click the Fix icon on the toolbar to repair the problems, as shown in Figure 10.1.

Image

Figure 10.1. The Fix button on the Database tab of the Extension Manager in Joomla! 3

We suggest a more cautious approach than simply clicking the Install Update button. First, prior to updating go to the joomla.org Web site and read the announcement for the release and the release notes. This will tell you whether there are important security issues that must be fixed immediately and if there are any changes that might impact your site’s functionality. The announcement will also contain a link to Frequently Asked Questions about this specific release. This is where any known issues with the release will be documented. If there is a high-level security issue, it is important that you update right away. If there is not, you should take some time before updating to make sure that there are no reports of problems for any extensions you are using. You will want to update any extensions that need to be updated first, before updating your site. To check on this visit the sites for the specific extensions and check forum.joomla.org.

Backing Up Your Site

Next, you should make a complete backup of your site, including both the files and the database. Do not rely on any backup system your hosting provider may offer. Ultimately, it is your site, and backups are your responsibility. Set up a schedule to make regular backups depending on the rate of change your site goes through in a typical month. If you update content daily and have an interactive site that is active, it may be best to get at least a daily backup of your database and a monthly backup of your site files. If your content doesn’t change often, a monthly backup of your full site and database will most likely be sufficient. Be sure to store your backup files off-site. Download them to a local hard drive or disk, or store them in a different online location.

There are two parts to any Joomla! backup. First, there is the backup of the database, which contains your site’s content and information on all of the settings and options you have selected. Second, there are the files. These include the Joomla! software but also any extensions and any images or other files that you have added to the site.

Manual Backup

You can do a manual backup of your site from the hosting control panel for your server. We previously used this during the manual installation of Joomla! in Chapter 3.

To back up your files, go to the File Manager. Find the Joomla! files. Often these will be right in the root of your Web site, but sometimes they will be in a folder. The file structure will look as in Figure 10.2.

Image

Figure 10.2. File structure for Joomla! on your server

Highlight all of the Joomla! files and folders or click the Select All button. On the icon bar at the top of your screen click the Compress icon shown in Figure 10.3. You may get a choice of compression types; any of them is fine but zip is probably the most familiar to many users. One good idea is to include the date of the backup in the name of the compressed file. That will be helpful if you ever need to restore the content from a specific date. Once the file is created, select it and then click on the Download icon to put it on your computer. Make sure to put it in a place you will remember if you ever need it.

Image

Figure 10.3. The compress button in the Cpanel File Manager

To back up your database return to your control panel and find the icon for phpMyAdmin. This will usually be in the Databases area of the panel. Click on the icon. On the left you will see a list of one or more databases. Find the one for your site and click on it.

Once in the database, go to the Export tab as shown in Figure 10.4. Click on the Go button. This will give you a dialog box to allow you to save the SQL file. Save it in the same place as your other backup and also with a name that lets you know that this database goes with that zip file (for example, with the date in the name).

Image

Figure 10.4. The Export tab in phpMyAdmin

That’s it; you have backed up your site.

Backup Extensions

There are a number of extensions for Joomla! that will manage the complete backup for you from inside your Joomla! site (so you don’t have to go to the control panel). The most widely used is called Akeeba Backup. You install Akeeba as a regular Joomla! extension.

After installing Akeeba, you will be prompted to run a configuration wizard that will complete the installation process. (You will also get links to the very complete documentation.) Once that is complete, you will be prompted to back up your site. This may take a few minutes. Figure 10.5 shows the interface when you have completed your backups.

Image

Figure 10.5. Akeeba Backup view after doing backups shown in Joomla! 2.5

Once your backup is complete, you can download the file. The developer of Akeeba cautions against using the Download button that the extension provides and instead strongly encourages you to use FTP (File Transport Protocol) for binary files. To use FTP you will need to install an FTP client such as FileZilla.


Tip

You can get FileZilla from http://filezilla-project.org/. There are a number of other very good FTP packages, some available for free and some for a fee. You may want to investigate possibilities specifically designed for your computer’s operating system (such as iOS for Macs and Windows for PCs).


Updating Extensions

Most extension developers will notify you when updates to extensions are needed through the Extension Update link (in Joomla! 3) or icon (in Joomla! 2.5) located on the control panel (dashboard) of your site administrator near the Install Update link or icon. Whenever you log in to the administrator, check that icon to see if you need to take any action. In addition, it is good practice to keep informed of any updates and news regarding the extensions you use on your site. Subscribe to the mailing list, forum, announcements, or news feeds that the developers may offer. When an update to an extension is announced, it is important to update the extension, especially if there is a security issue involved.

If the control panel indicates that you need to update an extension, go to the Extension Manager Update tab. If available updates are listed, check the box next to their names and click the Update button on the toolbar as shown in Figure 10.6. You will get a success message after a successful update.

Image

Figure 10.6. Updating an extension in the Extension Manager in Joomla! 2.5

If you are using an extension that does not use the one-click update procedure, updating remains relatively simple. For the vast majority of modern extensions, you simply follow the same procedure as for installing an extension using the Extension Manager. This means that you will either download the new version to your computer and use the Upload Package File method, or you will use the Install from URL method with a URL provided by the developer.

For a small number of older extensions you may not be able to simply update. These extensions require you to uninstall the old version and install a new one. Uninstalling is done on the Manage tab of the Extension Manager. Select the extension and click the Uninstall icon on the toolbar. Because these extensions follow nonstandard procedures, you need to read the detailed instructions from the developers.

A relatively new initiative for the Joomla! Project is the vulnerable extensions list (VEL) located on the Joomla! Official Documentation wiki at docs.joomla.org/Vulnerable_Extensions_List. This initiative was started by a team of interested users who wanted to track vulnerable extensions and has been a valuable asset to the community. You can subscribe to the page’s news feed to stay updated on vulnerable extension reports and extended information on resolutions or ongoing issues.

As part of the maintenance of your site, it is good practice to monitor the development activity for the extensions you are using. Any extension that is no longer supported by the developer should be completely removed from your Web site along with any extensions you may have installed but that you are not using. Check to make sure that all related files for any extension that you have uninstalled have been properly removed from your site, because leaving these orphan files on your site could expose your site to a security vulnerability.

Migrating to a New Major Version

In Joomla! the major release refers to the first number in the name. So, Joomla! 2.5 is part of the version 2 major release and Joomla! 3.0 is part of the Joomla! 3 major release. The Joomla! CMS considers moving within a major release to be an “update” and moving between major releases to be a “migration.” A migration is more complex than an update, and that is why you should consider your options for moving carefully. Joomla! has made substantial progress in making migration easier to manage, but it is still a serious undertaking.

The Joomla! CMS Release Cycle

The Joomla! CMS has a release cycle that includes LTS releases and STS releases. An LTS release ends with the number .5, so Joomla! 2.5 is an LTS release as was Joomla! 1.5 and as Joomla! 3.5 will be. All other releases are STS releases.

Long-term releases are supported for 18 months. The idea is that you can choose to always stay on LTS releases and not have to worry about updating your site and learning how to use any new features or changed functionality (although you must do maintenance updates to keep your site up-to-date on security issues and minor bug fixes). LTS releases are the final release of the development cycle; there are no more short-term releases in a cycle after the long-term release. Thus Joomla! 2.5 will not be followed by Joomla! 2.6. That is how stability is ensured. All new features and important changes only go into the release that is the next short-term release. Standard or short-term releases happen every six months, and when you update you will get new features, but you may also have to cope with changes. Once you start with a short-term release, you need to stay with short-term releases until you get to the long-term release for that series. Thus, if you started with Joomla! 3.0, you would need to update to 3.1, 3.2, and then 3.5. At that point you could stay on version 3.5 until the next LTS release, which will be 4.5. Or you can move to version 4.0 (or 4.1 when it is released) and continue with the STS cycle.

If you have an existing site that has been working well for you on an LTS release, there is no real reason you should hurry to update to a new major release (such as from 2.5 to 3 or from 3 to 4). On the other hand, if you think you need the new features or are adding new extensions, you may decide to move to the new release since many extension developers will be turning their main attention to them. Inexperienced users should not create a site with any new Joomla! release until it is labeled General Availability or Stable. Do not build a site on an alpha, beta, or release candidate because there is no guarantee that the final release will be compatible with it. By their very nature they may include incomplete features and serious bugs. Many users will want to wait until after the first maintenance release, which will have a .1 at the end of its name, such as Joomla! 3.1.1, 3.5.1, or 4.0.1. That release will resolve any issues that emerge soon after the initial release.

Eventually you will want your site to be on the most up-to-date version of Joomla!, but for many 2.5 users who are happy with the functionality of their sites, there is no reason to rush to move your site to Joomla! 3 or even to version 4 when it is released in 2014. Although each new release includes new features and improvements, if your site doesn’t need those features and you don’t want to move it, there is no reason for you to hurry to do so. Joomla! 2.5 will be supported for 18 months after the release of Joomla! 3.0, so you have lots of time to make the transition to a new version and may even decide to wait until the release of 3.1 or 3.5 to actually move your site. Because a migration is more complex than an update, it makes sense to use those points as an opportunity to do a review of your site, consider whether it needs a design or structure update, and in general refresh and clean it up in large and small ways.

User Interface Changes

New releases almost always have changes that will take some getting used to for users of older versions. These are changes in the user interface and user experience, or UI and UX for short. While your templates are the most obvious aspect of the user interface, there are also at times underlying changes to the functionality that make some of the surface changes possible. For example, changes in what appears on the first page of the administrator or in the ordering of buttons on the administrator toolbar are changes in the user experience. While changes in UI and UX should improve things for users, anyone who has had to adjust to changes in an e-mail system or word processor, or to updates in a desktop operating system (such as to Windows on PCs or iOS on Macs), knows that getting used to a new system can be painful. Whether you should migrate a Web site to a new version depends a lot on whether you and your users are ready, willing, and able to adjust to a new user experience.

For example, the most anticipated changes from version 2.5 to version 3 involved changes in the user interface and design of the Joomla! administrator. This was the first major redesign of the administrator since the Joomla! Project was founded. The goal is to have a more intuitive and useful design that is easier to master. It will also build in greater consistency between the design of extension administrator pages and the core CMS extensions. You have already seen the differences between version 2.5 and version 3 in Chapters 3 through 9.

All aspects of this redesign are not present in Joomla! 3.0 because of the complexity of the project and the important role that continuous user and developer feedback will play in implementing its details. By the time of the 3.5 LTS release it will be finalized. If you have many back-end users who have been trained on the old user interface, you will need to train them on the new one. For this reason you may decide to wait until the design is closer to the final version.

When making a migration decision, you should evaluate the changes in user interface and the likely impact for your users.

Templates

Major releases of Joomla! have always involved changes in page layouts that make it difficult to use the same template across versions. When considering migration, you should expect to have to do more preparation work than for an update within the same version.

Many Joomla! 2.5 templates must be modified to work with Joomla! 3 (and it is reasonable to expect that moving from version 3 to version 4 will also require template changes). How complex this process is depends on the template itself. If your template is relatively simple, migrating it will not be hard. If you purchased it from a template firm, you may want to check with the firm to see whether it has a 3 version. If you created a template or modified one of the core templates, you will find instructions on migrating to version 3 on the docs.joomla.org Web site. It may be best to wait until you are ready for a site redesign and a new template to migrate.

The templates in Joomla! 3 are designed to be “responsive,” which means that they adjust smoothly when your site is displayed on mobile phones and tablets. This is important for the modern Web, where so many of your visitors will be using these devices. However, there are also many templates for Joomla! 2.5 that have been designed to be responsive, and you may want to investigate simply incorporating responsive features into your existing template.

Finally, the templates in Joomla! 3 use the Twitter Bootstrap framework, as discussed in Chapters 7 and 8. Some extensions are also going to be designed to work with Twitter Bootstrap and so will more easily integrate visually with the administrator template in Joomla! 3. However, there are also Twitter Bootstrap-based templates available for Joomla! 2.5, so it may well be worth investigating updating your template to incorporate Twitter Bootstrap or changing just your template rather than migrating your whole site.

Changes in Minimum Requirements

New major releases of Joomla! (such as versions 3.0 and 4.0) will almost always raise the minimum standards for your system. This is because the underlying infrastructure that supports Joomla! changes and has its own release cycles. In general, minimum requirements will not change within a major version except if necessary for security reasons. For example, Joomla! 3 requires that your site be on a server that has PHP with a minimum version number of 5.3.1 and MySQL of 5.0.4, which is a change from what was required for Joomla! 2.5.

If you have an existing Joomla! site, you can visit the phpinfo tab, which you can find by clicking Help on the top menu and then selecting System Info to find the PHP versions you are currently using. If they do not meet these requirements, ask your host whether a newer version is available. Some hosts will upgrade software only if they are sure you are not using any applications that require older versions. Submit a support ticket to your host requesting an upgrade or upgrade instructions. If an upgrade is not available, you will not be able to migrate and remain on the same host. It is important to use a host that has a good security track record, as well as a knowledgeable staff who stays up-to-date on industry trends and software. If your host is running out-of-date software and can’t explain why, it is time to find a new host.

Preparation

Major releases are the points in the release cycle when Joomla! developers are allowed to make changes that are not backward compatible. That means some things that worked in a previous major release may not work in the new major release. This is the main reason that migration is more complex than updating. For example, between version 2.5 and version 3.0 there are changes that impact templates that will mean that many templates will have some parts that don’t work. Extension developers also need to make small but vital changes in their code. (Fortunately these changes will also work in Joomla! 2.5 extensions, so even with a Joomla! 2.5 site your extensions may be ready for Joomla! 3 if the developers have taken advantage of this.) Because of this you need to prepare for migration by determining whether all of the extensions and templates you use are ready for the new release. You can usually do this by visiting the extension developer’s Web site. If an extension is not ready, you will either have to wait or find an alternative (or you could update the extension yourself or pay someone to do so).

Making a Test Site

After doing your research, it is a good idea to make a test site. Since you are already making backups of your site on a regular basis, you can do this easily. It makes sense to make the test site on the same server where your site is hosted because that will have the exact same environment in terms of PHP and database versions and server settings.

If you have used an extension such as Akeeba Backup to back up your site, use its Kickstart procedure to create a test site in a new folder on your host. Follow the documentation available from the developer’s Web site to do this.

If you have done a manual backup of your site, you can make a test site as follows:

1. From your hosting control panel, follow the instructions from Chapter 3 for creating a new empty database (see the tip if your host limits you to one database).

2. Go to phpMyAdmin (or whatever manager your host is using) and import your backup of the database. This is shown in Figure 10.7.

Image

Figure 10.7. Import the backup database on the Import tab.

3. From the hosting control panel of your site, go to the File Manager.

4. Create a new folder called test.

5. Upload the zip file with your backup to the test folder following the procedures discussed in Chapter 3.

6. Extract the files using the Extract button, which is usually next to the Compress button we used earlier.

7. Find and edit the configuration.php file, which will be located in the test folder. In that file change the database name, database user, database password, and database prefix to match the new database that you made. (You may be able to use the same username and password on some hosts.)

public $user = 'root';
public $password = 'new_password';
public $db = 'new_database_name';

At this point you can browse to http://yourdomain.com/test and you should see your test site.


Tip

If your host limits you to one database, you can still make a test site. Open the text file containing your database backup in a plain text editor. You will see that each table definition has a name like this: prefix_users. The prefix is a value you set during installation, and it is stored in the configuration file in the line that says public $dbprefix = 'myprefix_';. Pick a new value for the prefix, and search for and replace all of the instances of the old prefix with the new one. Now your tables for the real site and the test site will have different names, and they can all be stored in the same database.

Go to phpMyAdmin and open your database. On the Import tab import the file with the renamed tables. Now you are set and the only thing you need to do is to change the $prefix value in the configuration.php (the database name, username, and password stay the same) for the test site (don’t touch the file for the live site).


Testing the Update

With your test site in place, you are now ready to do a trial run of the migration process. In terms of actually doing the upgrade, the procedure is exactly the same as for doing an update. The only difference is that you need to tell the Joomla! Update component that you want to update to the short-term release (if you want to update to a long-term release, you do not need to do anything). Go to the Joomla! Update Manager and click on the Options icon on the toolbar. You will see a drop-down field labeled Update Server. Change this option from Long Term Support to Short Term Support and save as shown in Figure 10.8. At this point update information will appear for the STS version, just as for a normal update. Click the Install Update button and you are set. But that is only the beginning.

Image

Figure 10.8. Update settings changed to Short Term Support

You will immediately see any changes in the user interface that have been made—or it may even be that your existing administrator looks broken. It is likely that you will want to change your administrator template to the new default template immediately. This is because the new template will be designed to work with all of the changes that have been made in the release. Go to the Template Manager and change this. If you have read the release materials, you will already know the name of the new template. In the case of Joomla! 3, it is called Isis and you should switch the default style. Take some time to look around the new interface and see what has moved. There will always be a learning curve when there are UI changes, and the test environment is a good place to learn.

Next make sure that you have updated all of your extensions that have released updates for the new version. At this point, parts of the user interface will look different to you since major releases are when these changes are made.

Now look at the front end of your site. Are there obvious places where pages are not rendering correctly? Do an inventory of your menu links and the kinds of actions that your users will normally carry out. For example, this might include logging in, logging out, posting on a forum, sending a contact form, editing user profiles, creating contacts, searching, or any other activities. If you have some trusted users, you may want to invite them to help you test. With luck everything will work, but you may need to contact extension developers about specific issues. You may need to change options in menu items, component settings, module settings, or elsewhere. You may even want to take advantage of some new features. Keep a list of all changes you make.

Managing template changes is usually one of the most difficult items in a migration of a simple site. You may decide to install a new template, or you may decide that you want to fix any parts that are not working. Chapters 11 through 13 along with Chapters 7 and 8 include examples of modifying existing templates that will help you to understand this process. The Templates forum at forum.joomla.org is also a good place to get help solving template problems. Keep track of any template files you change.

Going Live

Once you are satisfied with the test site, it is time to do the upgrade of the actual site. Because your live site has stayed in operation while you have been testing, you cannot simply reverse the steps because new content may have been created and other aspects of your database may have changed.

While you are doing the update, the safest thing to do is to take your live site offline temporarily. Do this in the Global Configuration Site tab. If you plan the going-live process carefully, you will be able to accomplish it in under an hour for a simple site. Before beginning the migration, make a new backup of both the files and the database of the live site and the test site. This will ensure that you have any new changes.

Now repeat the update procedures. First, use the Joomla! Update component to update the core of Joomla! Then update your extensions as needed. Make any changes to menu items, modules, or other settings that you kept track of while working on your testing site. Replace or update any template files that you modified on the testing site.

Check over your site and when you are satisfied, put the site back online. It is normal to expect that some minor issues will be discovered in your migrated site, so be prepared to monitor user feedback closely for a week or so after it is launched.


Tip

Migrating from Joomla! 1.5 to either 2.5 or 3 is more complex than migrating from 2.5 to 3. This is because of the switch to infinitely deep categories and the adoption of the new Access Control List system. This involves complex database changes that are currently beyond the scope of the Update component. Fortunately there are several extensions available to assist with this migration. The two most widely used are jUpgrade (free) and SP Upgrade (commercial). Neither is perfect, but both have active development and constant improvement. When doing a migration from 1.5, you should carefully follow the procedures outlined in this chapter. Always practice on a test site first. In addition, carefully review your categories in the migrated site to ensure that migration has been successful (such as all 1.5 sections becoming categories).


Conclusion

Keeping your site software up-to-date is an essential task for you as a Webmaster. Even if you almost never post new content, you need to make sure that you pay attention to updates, especially those involving security issues. Updates and migrations also provide a good opportunity to review and refresh your site.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset