Many new WordPress templates have been incorporating the timthumb.php thumbnail generator.

If you run into any 403, 404 or 500 errors when implementing timthumb, here are a few tips:

  • Make sure the timthumb.php file has its permission set to 775
  • Make sure the “cache” folder’s permissions are set to 775. The cache folder is generated the first time you try to run timthumb. It is located within the same directory as the timthumb.php file.
  • If you host your website on HostGator, you will need to ask them to change a few settings within mod_security for Apache. This is a documented issue with timthumb usage on Host Gator. Below is an email I sent to them making my own request:

    Dear Host Gator,

    I recently updated my WordPress website with a theme that uses the
    timthumb.php thumbnail generator.

    I have learned that in order for it to work properly HostGator needs to
    change a few setting for my website. When I try to run timthumb I receive
    a 403 error.

    I need the following rules [1234234,340151, 340153] added to mod_security
    for www.recommendedwebtools.com.

    Please let me know if there are any questions or concerns.

    Thanks!

    Contact Host Gator at their support email address. They responded within the hour and the setting was changed shortly thereafter.

Happy Thumbnailing!

Keep Helpful Content Coming to Your InBox - Subscribe Today!

As someone who is interested in building, maintaining and promoting your own website, a subscription to the Recommended Web Tools newsletter will keep you informed about the tools you need to get the job done.

An email subscription includes a weekly blog posts update, keeping you informed of the topics being discussed on the blog. You will also receive the Recommended Web Tool of The Week. Once every week (or two) you will receive a short email focused on informing you of particular recommended tool.




 

About the Author

Paul Flyer loves to research the web and find resources and tools for building, maintaining and promoting websites. Based in Saint Louis, MO, he works in management and spends his free time sharpening his web development and copy writing skills. Feel free to contact Paul with any questions, comments or ideas. He is also available to help you with your own website.