Friday, 26 September 2014

PHP Fatal error: Class 'JFactory' not found

I have faced this issue in Joomla site and searched the forums but none of the forums including joomla did not give solution for me.
They simply suggest to check joomla version, php version compatibility and php extensions.
Finally I have fixed the issue.

 [26-Sep-2014 18:11:29 Europe/Berlin] PHP Fatal error: Class 'JFactory' not found in /home/test/public_html/index.php on line 31

Cause & Solution:-
In my case, it seems file which gives the class JFactory was missed.

/home/test/public_html/libraries/joomla/factory.php --->Core file for Joomla.

Simply restore that file under proper path to fix the issue.


  1. Hi, thanks for sharing your solution. How do I restore the file path?

    1. Hello Desarrollo,

      That file [factory.php] is comes under Joomla by default.
      So please download the full Joomla package and simply copy this file to /home/xxx/public_html/libraries/joomla.
      Otherwise if you have any other Joomla sites in your server then simply copy this file to the site which you are facing issue.

      Thank you

    2. Thanks for your post, it saved me a bunch of running around. If anyone needs a fresh copy of this file, which I ran across on an old site of mine (customer didn't want to upgrade yet), I found a spot to download the older versions of Joomla, so you can get a fresh copy of factory.php here: