Category Archives: CMS

What is WordPress

WordPress is a free and open source blogging tool and a content management system (CMS) based on PHP and MySQL. It has many features including a plug-in architecture and a template system. WordPress is used by over 16.7% of Alexa Internet’s “top 1 million” websites and as of August 2011 manages 22% of all new websites. WordPress is currently the most popular blogging system in use on the Internet.

It was first released on May 27, 2003, by founders Matt Mullenweg and Mike Little as a fork of b2/cafelog. As of December 2011, version 3.0 had been downloaded over 65 million times.

What is Joomla?

Joomla is an award-winning content management system (CMS), which enables you to build Web sites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made Joomla the most popular Web site software available. Best of all, Joomla is an open source solution that is freely available to everyone.

What’s a content management system (CMS)?

A content management system is software that keeps track of every piece of content on your Web site, much like your local public library keeps track of books and stores them. Content can be simple text, photos, music, video, documents, or just about anything you can think of. A major advantage of using a CMS is that it requires almost no technical skill or knowledge to manage. Since the CMS manages all your content, you don’t have to.

What are some real world examples of what Joomla! can do?

Joomla is used all over the world to power Web sites of all shapes and sizes. For example:

  • Corporate Web sites or portals
  • Corporate intranets and extranets
  • Online magazines, newspapers, and publications
  • E-commerce and online reservations
  • Government applications
  • Small business Web sites
  • Non-profit and organizational Web sites
  • Community-based portals
  • School and church Web sites
  • Personal or family homepages

What is Drupal

Drupalis a free and open-source content management framework (CMF) written in PHP and distributed under the GNU General Public License. It is used as a back-end system for at least 2.1% of all websites worldwide ranging from personal blogs to corporate, political, and government sites including whitehouse.gov and data.gov.uk. It is also used for knowledge management and business collaboration.

The standard release of Drupal, known as Drupal core, contains basic features common to content management systems. These include user account registration and maintenance, menu management, RSS feeds, page layout customization, and system administration. The Drupal core installation can be used as a brochureware website, a single- or multi-user blog, an Internet forum, or a community website providing for user-generated content. By extending the Drupal core with contrib modules there is virtually no limit to the sorts of web applications that can be built.

As of December 2012, there are more than 19,600 free community-contributed addons, known as contrib modules, available to alter and extend Drupal’s core capabilities and add new features or customize Drupal’s behavior and appearance. Because of this plug-in extensibility and modular design, Drupal is described as a content management framework. Drupal is also described as a web application framework, as it meets the generally accepted feature requirements for such frameworks.

Although Drupal offers a sophisticated programming interface for developers, no programming skills are required for basic website installation and administration.

Drupal runs on any computing platform that supports both a web server capable of running PHP (including Apache, IIS, Lighttpd, Hiawatha, Cherokee or Nginx) and a database (such as MySQL, MongoDB, MariaDB, PostgreSQL, SQLite, or Microsoft SQL Server) to store content and settings. Drupal 6 requires PHP 4.4.0+ while Drupal 7 requires PHP 5.2.5 or higher.

Optimizing Magento

Magento is a very popular eCommerce application. It offers a great deal of customization and abilities from initial install. Here are a few suggestions for optimizing a Magento installation.


Changes to .htaccess

Enable Output Compression

In your .htaccess file for Magento you will find a section of text starting with the line, <IfModule mod_deflate.c> and ending at </IfModule>

This section of code can be used to turn on Apache’s mod_deflate module, which provides compression for text, css, and javascript. You will want to uncomment (remove the # symbol) multiple lines so that it looks like this:

 

<IfModule mod_deflate.c>

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

# Insert filter on all content
SetOutputFilter DEFLATE
# Insert filter on selected content types only
AddOutputFilterByType DEFLATE text/html text/plain text/xml
text/css text/javascript

# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don’t compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary

</IfModule>

 

Note: Some of the lines were word-wrapped by the web browser. You may want to copy and paste to make sure everything is on the correct lines.

Enable Expires Headers

First-time visitors to your page have to make several HTTP requests. By using the “Expires” header you make the components  of the requests cacheable. This avoids unnecessary HTTP requests on subsequent page views.

You want to find the area of the .htaccess file that starts with <IfModule mod_expires.c> and ends with the first </IfModule> you see after it, and make it look like this:

 

<IfModule mod_expires.c>

############################################
## Add default Expires header
##http://developer.yahoo.com/performance/rules.html#expires

ExpiresActive On
ExpiresDefault “access plus 1 year”

</IfModule>

 

Note: Some of the lines were word-wrapped by the web browser. You may want to copy and paste to make sure everything is on the correct lines.


Magento Administration Tweaks

Merge CSS and JS

This particular tweak will reduce the number of HTTP requests on your eCommerce site. If you are using a Magento version prior to 1.4.x, the free extension Fooman_Speedster can be used, if you are running a later version of Magento follow this:

  1. Login to your administration area and go to – System > Configuration > Developer
  2. Under “JavaScript Settings”, change “Merge JavaScript Files” to yes.
  3. Under “CSS Settings”, change “Merge CSS Files” to yes.
  4. Finally you will want to clear your Magento cache.

Enabling Flat Catalog

The model Magento uses to store customer and product data results in longer than average SQL queries and more reads. Enabling the Flat Catalog option for Categories and Products will merge product data into one table, therefore improving performance.

  1. Login to your administration area and go to – System > Configuration > Catalog
  2. Under “Frontend”, change “Use Flat Catalog Category” to yes.
  3. Under “Frontend”, change “Use Flat Catalog Product” to yes – this is optional.
  4. Finally you will want to clear your Magento cache.

Database Maintenance Tips

One of the main issues with Magento sites running slowly, is a database that has become large and difficult to use for sending/retrieving data from.

Here are a few tips for reducing the size of your Magento database.

NOTE: Please be sure to backup your database before performing any of the following changes.

Database Logs

There are several tables used by Magento for logging. While logging is very important regarding knowing what has and is going on with your store, the logs can become large very quickly, so regularly maintenance can be of great assistance.

Here are the tables for logging:

log_customer
log_visitor
log_visitor_info
log_url
log_url_info
log_quote
report_viewed_product_index
report_compared_product_index
report_event
catalog_compare_item

Database Log Cleaning using Magento Administration

  1. In Magento Administration go to System > Configuration
  2. In the left menu under Advanced click on System
  3. Under “Log Cleaning”, change “Enable Log Cleaning” to YES and configure the Save Log for 14 days.
  4. Click “Save Config”

log.php Utility

Magento provides a shell utility that can be configured using Cron or run manually to clean the database logs.

Manually

Log into your account via SSH and cd to the Magento root directory thentype:

php -f shell/log.php clean

You can use the -days switch to specify how many days back to save

Cron

  1. You will want to login to cPanel
  2. Click on Cron Jobs

This is an example only:

php -f /home/yourcpanelusername/public_html/path/to/magento/shell/log.php

Note: The above line is on one line and may have been word-wrapped by the web browser. You may want to copy and paste to make sure everything is on one line.

Database Cleaning via phpMyAdmin

Using phpMyAdmin offers more flexibility and efficiency when working with databases.

  1. Login to cPanel and click on phpMyAdmin
  2. Click on the database associated with your Magento installation
  3. Now select these tables:

log_customer
log_quote
log_summary
log_summary_type
log_url
log_url_info
log_visitor
log_visitor_info
log_visitor_online

  1. Below the tables listed, click on the drop-down box “With Selected:” and select Empty
  2. You will get a confirmation screen, click Yes.

You will want to perform this database log cleaning on a regular basis. Utilizing the cron job option will ensure it is done without the need to perform any manual tasks. You will want to be sure you have properly setup this cron.

Optimizing Joomla

Joomla is a popular CMS that is highly extensible and customizable. Here are some steps to optimize your Joomla installation, and reduce the CPU consumption of this script.

  • Enable Caching
    • This is probably the most important. You can lower the footprint of your site on the server noticibly by enabling caching. This should be enabled at all times.
  • Change your template
    • Some templates may look nice, but they can use up to 70 images per page request, each of which generates an HTTP connection to the server. When many people visit your site, you will end up consuming enough CPU to cause the server’s load to rise. You should consider clean template styles instead of image heavy templates.
  • Disable Gzip compression
    • The CPU has to work harder to compress each of your pages before it sends it out. If you have Gzip compression enabled, an extra overhead is added to each page request.
  • Be careful about components
    • Many components are heavy CPU consumers, and will cause your site to raise the server’s load. Make sure you’re only using the minimum amount of components that are necessary to the operation of your site.
  • Do not use statistics components
    • These use a lot of SQL queries to constantly update and display your site statistics. Use Awstats or Google Analytics to track users.
  • Optimize Forums
    • If you are using a forum bridge/extension such as FireBoard or something similar, make sure to require visitors to register before they are allowed to search and post, and employ captchas for your board.

These steps are not guaranteed fixes to bring a site to normal CPU consumption, but they will drastically reduce the amount of CPU consumed by a Joomla installation

Optimizing WordPress

WordPress is currently one of the most popular blogging/CMS applications. Here are some ideas for optimizing WordPress and reducing the CPU consumption of this PHP script.

  • Make a backup of your account first, and then upgrade to the latest version of WordPress. The latest versions have optimized code that could reduce the CPU consumption of your site.
  • For permalink structure, do not start with the category, tag, author, or postname fields. Instead try /%year%/%postname%/ or /%post_id%/%postname%/. Also don’t worry about 301 redirects as wordpress will automatically handle that after the permalink change.
  • Install WP Super Cache or W3 Total Cache, which can be done from your WordPress Dashboard under Plugins. Follow the links below for information on how to setup these plugins.
  • Many themes are more CPU intensive.
    • Make sure your page loads are generating no errors in your Error Log (in cPanel under Logs)
    • Also, if you’re using dynamic image resizing, you may want to disable this if possible.
    • If all else fails, contact the theme provider for assistance, or change to a different theme.
  • Disable CPU intensive plugins, or plugins that you no longer need.
    • All related posts plugins (WordPress Related Posts, YARPP) can cause significantly high load in most cases.
    • WPRobot3 and other auto-posters can also cause high load issues, and should be disabled if they are causing issues
    • StatPress and other wordpress statistics software should also be disabled, as these too can consume too much CPU in certain cases. Use Google Analytics instead for statistics.
    • Any other plugins that are not vital to your WordPress should be disabled.
  • Manage Spam bots. Non-human visitors/posters (aside from web spiders) should be blocked. Use a captcha such as SI CAPTCHA to prevent comment spam.
  • Lower the rate web spiders crawl your WordPress blogs, if you have a large amount of blogs hosted under your account. High crawl rates can drive up the load on the server, as many bots try to index your sites.
  • These changes are not guaranteed fixes, but do provide a starting ground for correcting high load issues on WordPress sites. If there are any questions about this, don’t hesitate to contact support.