Can you tell a green field from a cold steel rail? A smile from a veil?
Do you think you can tell?
Stephanie Daniels sums it up well, "Optimized sites are better for the environment. That’s because they’re significantly faster, more usable, with content that’s optimized for SEO and user experience. It’s my belief that Drupal has all of the tools in place to create sustainable websites…if you just know where to look.".
If only I had Drupal back in 1995. That was the year I built my first website for a Fair Trade Retailer called Bridgehead. Back at this time, the Internet was a very different place. People were using the web at that point, but it wasn't embeded in our lives like it is now.
Even the ecological footprint of the Internet 20 years ago was pretty small. Sure, there was already a network of computers that spanned the globe, but there weren't the giant data centres that there are now.
There are over 1 million sites running Drupal right now, representing about 3% of the Internet. The Information and Communication Technology (ICT) sector is estimated to contributed around 2 to 2.5 per cent of global greenhouse gas (GHG) emissions according to the International Telecommunication Union. There is a nice breakdown of this energy consumption in the world's ICT. This is only growing as we find more ways to use the Internet to make our lives more convenient.
There are a few people in the web industry who are aware of this and are working to raise awareness of others. I've been inspired by both Mightybytes and Manoverboard who have been leading this discussion within the BCorporation community. This article is going to extend the work of Mightybytes in their 15 Ways to Optimize Drupal for Sustainable Web Design article as well as the post by Manoverboard in Creating a Responsible, Earth-Friendly Website. I don't want to repeat their work, but saw an opportunity to update a few things, particularly in line with Drupal 7 & 8.
Certainly with Google prioritizing speedy pages in their search rank many sites have started making performance a higher priority. The rise in mobile usage also is driving performance, as usually mobile devices have lower bandwidth than desktop devices.
In Drupal there is a lot that can be done on the front-end, the back-end, and on the server. With a good content strategy we can ensure that the content is easy to find, and simple to use. All of this will help reduce the time that a user needs to spend using your site, which will reduce it's total carbon emmissions.Drupal Optimization
Here are some helpful tips to optimize your overall Drupal experience:
Remove unnecessary HTML to help the page load faster using the Fences module (7/8-dev). To change the to the lighter markup, make a copy of any tpl file that ships with the Fences module and add it to your custom theme. You can also make your own Fences-styled tpl files and place them in your theme by using the fences naming convention. Fences will automatically find them, and add them to the list available in the dropdown for field configuration.
Make sure you are delivering smaller images to your visitors using the Drupal Core's ImageCache module (7/8). This is especially important for mobile devices where the browser is rendering much smaller images. Page speed can be dramatically reduced by using big images that aren't optimized. Tools like TinyPNG can be useful to reduce image size before uploading them to your site.
There are so many reasons to design Mobile First, and using semantic HTML5 and modern CSS3. With Drupal we've been suggesting starting with a good base theme like Zen (7/8-patch) or Adaptive Theme (7/8-dev) for accessibility for years, but they also are great responsive platforms. Designing for a mobile device first forces organizations to prioritize what is most important to them and simplify their site. This can then be added to when a user is browsing your site with a big monitor and high bandwidth.
Use Scalor Vector Graphics (SVG) rather than PNGs or GIFs where possible. SVG files are usually very small, they can be written inline in HTML5 & CSS files, and they they scale without loosing clarity. This allows you to use the same image on your phone as you do on your desktop. Drupal 8 is replacing many of it's PNG files with SVG files for this purpose.
Today, LCD screens use the lest energy using a lighter colour palette. Of note, an old Cathode Ray Tube monitor will use about 200% more energy than a comparable LCD screen. So when designing your site, more than ever think about the advantages of a bit more white space.
Disable unnecessary and unused modules. There are modules like Devel (7/8-dev) that shouldn't be enabled on production site anyways for performance reasons. Drupal's statistics module can also slow down a page since it needs to write to the database for every page load. There are also modules like Views UI that are only needed when you are editing a View, so why not disable it by default. Some code from the enabled modules will be loaded with every page view, thus slowing down your site.
Many people visiting your site are probably skipping the home page and going directly to the content that the search engine sends them to. This is great for the user and also great for the environment. Make sure you've enabled the SEO Checklist module and follow the advice within it to ensure that search engines send visitors directly to the information they want.Server-Level Optimization
For those more savvy with server maintenance:
Enable page and block cache (Administer > Configuration > Performance) in Drupal 7. There are a great many improvements in caching in Drupal 8 and sites with changing content will perform much better. Page caching and CSS/JS aggregation is enabled by default, so hopefully it will be employed by default by more sites in the future. There have also been huge page improvements in the dynamic page cache for all users which should help interactive sites and improvements for administrators.
You may also choose to compress the cached pages using here. This can also be done in Apache, so it really depends on how you configure your server, no point to compress them twice. Make sure to increase the cache lifetime in Drupal so that you are not having to regenerate the pages unless needed. If you want to go even farther, install Varnish and set up the Varnish module (7/8-dev). Varnish is a very powerful page caching tool that is very configurable. For some sites we recommend setting up a seperate Varnish server devoted to serving cached pages.
Memcached is a high-performance, distributed memory object caching system that can be used to speed up your Drupal site by alleviating database load. The Memcache module (7/8-dev) or Memcache Storage module is required to take full advantage of this, and Memcached can be run alongside Apache or on it's own server, depending on expected demands.
You should also look at optimizing your database on a regular basis. The DB Maintenace module (7/8-dev) uses cron to run MySQL's OPTIMIZE TABLE on a regular basis. Ideally you could do this with a cron script using MySQL commands in off-peak hours too.
echo "OPTIMIZE TABLE accesslog,cache,comments,node,users,watchdog;FLUSH TABLES;" |mysql -u user -ppasswd
There are a great many other suggestions from the community on how you can tune your server. There is an active community of Drupal developers interested in high performance configurations, it's worth checking out their ideas. There are also videos on MySQL performance improvements for Drupal.
In Drupal 7, install Alternative PHP Cache (APC) to and the APC module (7) to cache PHP code. For Drupal 8, look forward to using PHP7, which runs way faster, than earlier versions of PHP. Drupal 8 runs much faster in PHP7, but unfortunately, APC is not yet available in PHP7.
Think of using a Content Delivery Network (CDN) to deliver some of your content. A CDN serves content from a location that will be optimized for the visitor's location. Wim Leers has written a series of great posts on setting up the CDN module (7) to optimize your site.
Look into adopting HTTP/2 on your server because it offers performance improvements and may negate the advantages of aggregating CSS/JS files. At the moment there is great browser support for HTTP/2, but less than 2% of sites support this new protocol. Regardless, it is usually best to assume that less HTTP requests = faster page loading.
Sometimes though you just need to spend a bit more on faster hardware, more RAM and solid state drives. Having multiple servers can really help deal with busy sites.
Think about switching to a green hosting company. Look for a host that is using green energy and has a strong environmental policy. Your servers are running 24/7, so having a green host can have a significant impact on your CO2 output. Mightybytes has a blog and Manoverboard a White Paper about green hosting that are worth checking out.Content Optimization
If your job is more catered towards the material shown on the site:
Think about your content. Could meaning be clearly conveyed with fewer images? Are the images optimized? Is content created using proper semantic markup that is styled using centralized (and cached) CSS files?
Andrew Boardman's blog on Manoverboard is great in encouraging us to keep it simple. Steve Krug's book Don’t Make Me Think contains principles that are "highly relevant to all digital interfaces not only for ease of use and human engagement but also in determining energy consumption that powers our online behaviours."
He also argues for archiving unused content. Users expect websites to contain fresh content and not to contain an active history of all pages that have ever been published. Fewer pages mean that there are more quality pages for search engines to index and that it takes less energy to maintain them.
Content should be findable. Users will benefit from sites that have a well considered navigational structure. Using structured taxonomies can also allow visitors to find related content. Enable Drupal's core search, or better yet set up Apache Solr and use the Apache Solr module to provide an amazing faceted search experience.
Don't use Flash. Aside from not working on many mobile devices, Flash is known to consume a lot of energy, which was one of the reasons that Apple used to not support Flash on iPhones. Use HTML5's <video> format which has huge accessibility advantages as well as it's environmental impact. There are of course other reasons not to rely on flash because of security or accessibility problems.Evaluate Performance
Finally, when you've done all of your changes:
Don't trust that enabling these tools will work. Page optimization needs to be evaluated to determine that you are actually delivering faster pages. Yahoo's YSlow, Google's Insights & WebPageTest all offer means to evaluate web pages. Note that your performance on various pages may vary. Yahoo! also has a list of best practices that are worth considering.
Page speed will always vary based on load. Consider using the Apache HTTP server benchmarking tool to simulate how your website performs with a heavy page load. The Performance Logging and Monitoring module can help you track your performance over time as well.
It's also really worth taking a look at Mightybyte's EcoGrader tool to get a quick evaluation of some of these improvements on your site.
In the end, it isn't difficult to take the time to look over the suggestions in this post and make a difference for the sustainability of your website(s) and the environment. Regardless of your technical expertise, there are improvements to be made at any level of website development. All you need to do is use the tool's at your disposal.Topic:
OpenXML is an open source specification that is used to build all Office 2007 and beyond document formats including Word and Excel. SpreadsheetLight builds on top of the standard OpenXML library to make Excel manipulation a piece of cake.More articles...
- Setting up Code Syntax Higlighting with Drupal
- ChainedFastBackend in Drupal 7
- Making namespaced callbacks work in Drupal 7 (without hacking core and with bound parameters)
- Decent PDF generation in Drupal
- Distinct options in a views exposed filter: The Views Selective Filters Module
- Bypassing Form Validations and Required Fields in Drupal: the BFV module.
- Using LINQ (Language Integrated Queries) in Drupal or how to write queries x5 faster
- Deploying Drupal Like a Pro
- Getting #2,000 requests per second without varnish
- Deploying changing module dependencies with Drupal
It's important to check links on your site to make sure they're working. Sometimes when URLs get updated, some links are forgotten. Manually checking a site for all links can be labor intensive and time consuming.
That's where Drupal's Link Checker module comes in. It's an excellent module that saves you a lot of time. This tutorial will help you to get started with it.
If you are already using hook_update_N() in your custom deploy module or within a Feature to make related database changes across your development and production environments, it is an easy step to just use variable_set() to make settings changes without locking them into a Feature with strongarm. The problem is, variable_set() runs silent.
Do you use Drupal, WordPress, Joomla, Magento or other PHP software?
If you answered "yes", then you use MySQL.
MySQL is the world's most popular database program and if you build websites, you'll benefit from an understanding of MySQL.
Today, we're really happy to launch our first self-published book, MySQL Explained.
MySQL Explained is a clear, step-by-step guide that will enable you to understand how your data is being stored and give you the ability to design your own custom applications!
Add to your developer toolkit with these best 8 free, lightweight web apps and tools to improve effectiveness in your Drupal development workflow.
In our last post, we looked at why Manhattan Associates was happy with Drupal 8 from a front-end perspective. What sealed the deal for them, though, were the powerful ways they could extend and develop Drupal 8 with improved configuration management, a new Web services API, and easy internationalization.Tags: acquia drupal planet
DrupalCon Asia 2016 is shaping up to be an amazing event with participation from all of the major system integrators and the Indian Drupal community.
Did you know that companies such as TCS, Sapient, Accenture, Cap Gemini, Infosys, Cognizant, Wipro and Mindtree all have 40+ member Drupal teams? Some of these firms have 300 or 400 people working in Drupal - making them the largest employers of Drupal talent in the world.
An open-source community is also open-heart! ;) Drupalers are one of the most friendly people on Earth and they need to stick together. Knowing that, every autumn InternetDevels Drupal development company organizes a cool IT hangout called Lviv Euro DrupalCamp.
Dear drupalers, we’ve done it! :) This year’s camp has surpassed our expectations and exceeded a milestone of 200 participants. Let’s keep rocking!Read more
Unless you live under a rock you’ve likely heard that Drupal 8 has a release candidate. This means that a stable release is not far away, and now much more complex sites can be built with Drupal 8 core alone.
For a while we’ll invariably still come up against projects that we have to use Drupal 7 for because you need certain contributed modules that don’t have a Drupal 8 release yet. Here are 7 things that will help allow you to build everything in Drupal 8 faster.Help maintainers in their issue queues
When building Drupal 7 sites, take a few minutes to to look at the issue queue of the contribs you are using and help progress or close 2 to 3 of the open issues.
This is also a good way to get up to speed with a module before you use it, and looking at the issue queue is one of the ways we grade modules before using them. So it’s not a stretch to do it again for a few minutes after you have implemented the module.
For a more in depth list of things you can do to help in issue queues see:
Whenever we build a site we’ll almost always find some modules that need patches applied, often we’ll have to create these patches ourselves. Rather than store these patches in our own private project repositories we always contribute them back to the issue queue of the project.
Uploading patches to issues queues has a twofold benefit, firstly it saves the maintainer from writing this code allowing them to perhaps focus on another issue instead, and secondly it allows others to make use of the fix up until the maintainer has time to incorporate it in a release.
If you find an existing patch that no longer applies, re-roll it against the latest development branch and upload the new patch to the issue.
Also remember to upload any partial fixes or findings you turn up when investigating a problem this can potentially save the maintainer or another user you investigative time allowing them to progress the issue further.Mark issues as “Reviewed and tested by the community”
If you find an issue with a patch and successfully use the patch don’t just add a comment saying it worked for me, mark the issue status as RTBC, and comment about how the patch worked for you.
When marking an issue as RTBC you should provide some before and after information to show how the patch resolved your issue, screenshots or videos are often really helpful.
RTBC is relative. Effectively, it means "Ready to be reviewed by committers", with the assumption that enough non-committers have reviewed, tested, audited, etc, to catch the obvious problems. Different people set an issue to RTBC with various levels of effort. Some will RTBC just on a visual inspection of a patch. Others will only do so if they've reviewed, audited, applied, tested, etc, etc. Basically, you build up a reputation for how much your RTBC "counts" based on how thorough your reviews are when you mark issues that
If you work at a company with module contributors, request that they be allowed to allocate some of their time to work on their contribs. If you are in charge of developers give them time to work on contributed modules.
This has numerous benefits:
- This can allow your developers to grow their expertise while working on a project they are passionate about
- It’s now possible for developers to flag that development time was was provided by your company
- Not only is your developer giving back to the community, your company is as well
- Potential clients are likely looking for a team that is involved in the community
- Your developer will become known as contributors and will be able to make connections with other contributed module developers that may benefit you in future projects
- Drupal marketplace company listings are now weighted by community contribution
A lot of module maintainers don’t have a lot of time to spare between work and family, especially when they have multiple contributed modules. They may find it hard to allocate as much time as they like to their projects. If you are in a position to help fund some development time then you can use the contact form on the maintainers profile to get in touch.Offer to co-maintain a module
If you're doing PHP based development at all, consider looking for a module you like that is seeking co-maintainers and offer to get involved.
Some potential benefits of this:
- You may find a mentor to help you improve your coding ability
- Your giving back to the community (good karma)
- You will make connections and friendships with other developers around the world
Organise an event where people come to help upgrade modules to Drupal 8. This is possibly one of the hardest things to co-ordinate so I’m going to write a whole post about it in three weeks time.Why did I write this?
The Realityloop team are involved with a substantial amount of contributed modules, many of which we no longer actively use. Our availability to work on these ebbs and flows and we’re sure there are other developers with modules that fit this pattern.
Not all of our modules need to exist in Drupal 8, but there are several really awesome ones Stuart (Deciphered) has written that we would really like to get ported as soon as possible.
I believe that as we are working with open source we have an obligation to help sustain its ongoing development this is the reason that Realityloop:
- is a supporting partner of the Drupal Association
- organises our local meetups and camps
- share the modules we develop back to the community
- mentors at DrupalCon’s
- gives back to the community in many other ways
In many ways the power of Drupal is it’s contributed modules, it is this that allows us to build such a wide variety of sites. I’m sending a call to everyone that builds sites using Drupal to help get that power to Drupal 8 as soon as possible!drupal planet
In my last post I was giving a high level overview of why we were looking at Elm in Gizra. Since that post, we've almost completed the demo app, and we've changed our status from "Looking at Elm" to "Choosing Elm".
The reason? In short - I believe it will save us money.
(Oh, and it's fun)
This video shows the automation involved in creating a new tool in ELMSLN. A tool in ELMSLN = new install profile = new domain = new drupal distribution.
Yesterday something significant occurred, http://brandywine.psu.edu launched on the new Polaris 2 Drupal platform. And soon the Abington Campus web site will move to the same platform. And perhaps many more.
A couple years ago, we decided to make a substantial investment in Drupal by employing a Drupal 8 Core Developer. The investment has paid off in ways we never anticipated, transforming our company for the better.
How it began
Drupal 8 development began in 2011. It plugged along for a couple of years and as it got closer to becoming a reality it became clear that the Drupal community would need to adapt their skill sets to accommodate the changes inherent in the new platform architecture. This was daunting. We knew the cost of getting our team ramped up on Drupal 8 was significant and that there could be a steep learning curve.
Drupal 7.41, a maintenance release which contain fixes for security vulnerabilities, is now available for download. See the Drupal 7.41 release notes for further information.Download Drupal 7.41
Upgrading your existing Drupal 7 sites is strongly recommended. There are no new features or non-security-related bug fixes in this release. For more information about the Drupal 7.x release series, consult the Drupal 7.0 release announcement.Security information
We have a security announcement mailing list and a history of all security advisories, as well as an RSS feed with the most recent security advisories. We strongly advise Drupal administrators to sign up for the list.
Drupal 7 includes the built-in Update Manager module, which informs you about important updates to your modules and themes.Bug reports
Drupal 7.41 was released in response to the discovery of critical security vulnerabilities. Details can be found in the official security advisory:
To fix the security problem, please upgrade to Drupal 7.41.Known issues
None.Front page news: Planet DrupalDrupal version: Drupal 7.x
Welcome to the first in an occasional series of posts about recent happenings in Drupal 7 core.
This is modeled after the Drupal 8 posts that have been going on for a while; you can find all Drupal 8 and Drupal 7 core updates on the Drupal Core Updates page going forward.Drupal 7.40 released
Drupal 7.40 was released last week! This is a maintenance release containing bug fixes, performance improvements, and a few new features. Now is a good time to test it out and upgrade your sites. If you discover any problems introduced by this release, report them in the issue queue.
Drupal 7.40 contains no security fixes, but Drupal 7.39 (released in August) does, so make sure your sites are updated to at least that version. Note that there is a security release window coming up today (October 21) also.New features in Drupal 7 core
Many people have the misconception that Drupal 8 will be the first version of Drupal that allows new features to be added after the initial stable release, but in fact that's been the policy for Drupal 7 since early 2012.
Several features have been added to Drupal 7 since it was released, but awareness is not as high as it could be which is one of the reasons we haven't added more. One goal of this series of posts is to highlight features that have been added recently as well as new ones that are up for consideration. A sample is below.For site builders
- Don't like incomprehensible machine names such as "hero_large_retina_1325x505"? Drupal supports human-readable labels on image styles (since Drupal 7.23), so you can now use capital letters, spaces, parentheses and anything else you want when naming image styles.
- Want a convenient theme debugging tool? There's one built into Drupal core (since Drupal 7.33). Just add the indicated line to the settings.php file in your local testing environment (or, since Drupal 7.40, uncomment the line that's already in the default settings.php file) and debug away.
- Do you like PHP traits? You can now easily use them because the Drupal 7 autoloader supports them (since Drupal 7.40). Just be aware that they are a PHP 5.4 feature, so if your module relies on them then sites running on earlier versions of PHP won't be able to use your module.
- When specifying dependencies in your module's .info file, you now can (and are encouraged to) specify the project that your module depends on also (since Drupal 7.40) - for example, dependencies = views:views_ui to declare a dependency on the Views UI module within the Views project, rather than just dependencies = views_ui. This extra information will help resolve ambiguities and can potentially be used by other tools in the future, for example by the drupal.org testbot or Drush to be able to automatically download dependencies that currently can't be downloaded automatically.
Here are some possible Drupal 7 changes on the horizon that need feedback from Drupal 7 site builders or developers to make sure we don't cause problems for existing sites and existing code (and some of them need developers to work on the patches also):
- We'd like to add an "administer fields" permission to core which would be required to use the field UI (in addition to whatever permission is required by each entity type the fields are attached to). This should benefit site builders and allow for more secure permission setups, but it could have a minor impact on existing sites and a moderate impact on contributed module automated tests; see the linked issue for details.
- How about simplifying the Modules page, in particular to hide the less-useful dependency information by default? This could potentially be a big user-experience win for Drupal 7 sites. Discussion (and potentially patches) are needed on the linked issue.
- Would your Drupal 7 sites be impacted if we added a default clickjacking defense to Drupal 7 core? This is a security improvement which would involve preventing Drupal 7 sites from being shown inside an iframe on a site with a different domain. For sites that need to be shown inside such an iframe, the protection could be turned off, but we need to make sure we get this right before adding it to core.
- We'd like to allow the "Limit allowed HTML tags" filter to also restrict HTML attributes in Drupal 7, to make Drupal's text filtering options a bit more flexible. Help in particular is needed with backporting the Drupal 8 patch on that issue.
Please leave constructive feedback on any these topics in the individual issues linked above.Proposed new release schedule for Drupal 7
We're considering adopting a similar release schedule for Drupal 7 that Drupal 8 will be using (i.e., a 6-month feature release schedule, with pseudo-semantic versioning). See the linked issue for details and to participate in the discussion.And that's a wrap
Thanks for reading; hopefully you found this post useful!
If you'd like to see more of these posts in the future (or if you'd like to help write them) or if you have any general feedback, feel free to leave your feedback in the comments. But if you have feedback on specific issues mentioned above, please leave it on the relevant issue instead. Thank you.
The explosion of content continues to grow. With more and more organizations managing multiple sites and digital channels, the distribution of content is increasingly difficult to manage. Content can easily become siloed in different sites or platforms. Different data models make it challenging to access, update, and replicate content changes across your sites.
Today, we're excited to announce Acquia Content Hub, a cloud-based content distribution and discovery service. Content Hub serves as a central content repository or hub that allows for bidirectional distribution of content between different platforms. Content Hub lets authors and site owners reuse content from other sites, commerce platforms, and more. To facilitate sharing between all these different systems, we normalize the content, and provide centralized tools to search and discover content within your network of sites. In addition, Content Hub can automatically keep content consistent across different sites (publish-subscribe), mitigating the risk of out of date information, all while respecting workflow rules on the local destination site.
I'm excited about the launch of Content Hub because I believe it will become a critical building block for creating digital experiences that are smart, personal, contextual, predictive, and continuous across digital touch-points in our lives (see Big Reverse of the Web). It's an ambitious vision that will require organizations to better leverage all of their content and data. This means that eventually all data has to get linked: from textual, audio and video data, to customer information and customer support data, to sensory and contextual customer information. To process that amount of data, we will have to build smart systems on top of it to create better digital experiences for the customer. Last year we launched Acquia Lift, and now 12 months later we're launching Content Hub -- both are important steps towards that vision.
Many sites want to showcase their most popular content to visitors.
However, creating a "Popular Articles" list in Drupal is harder than it might seem.
In this video, Robert shows you how to use the Statistics module (part of the Drupal core) to organize your articles by popularity.
This video is taken from our Advanced Views class.