How to find the correct Joomla log path

When migrating a Joomla 3 installation, either from one hosting server to another, or when uploading to your webserver or if you are changing the base installation for one reason or another - you need to make sure you that you update the configuration.php file correctly. One of the things which needs to be correct is the $tmp_path and $log_path. If these are not correct, your Joomla installation will look like its working correctly but it might start throwing strage errors such as

0 Cannot open file for writing log

or some other error, when trying to install new extensions, free Joomla templates, modules or plugins. 

However, sometimes it may not be so easy to determine the exact path you need to use before the /logs and /tmp - especially if you are on shared or on a new hosting server. Fortunately, there is an easy way to discover what the home path is:

Copy the following code into a text editor and save the file as absolute.php

 $path = getcwd();
 echo "Your Absolute Path is: ";
 echo $path;

Using your preferred FTP software, upload the file you have just created to the root folder of your website. Open your web browser and visit The result will show the absolute path!

IMPORTANT: For security reasons, delete this file as soon as you have copied the path!

Now that you know the exact path make sure you edit the configuration.php file to the absolute path + /logs and absolute path + .tmp as follows where <absolute path> is the path given to you by the above code 

public $log_path = '<absolute path>/logs';
public $tmp_path = '<absolute path>/tmp';


Let's help you manage your Joomla better


Free Joomla tips ebook button


One more thing... Did you know that people who share useful stuff like this post look AWESOME too? ;-)
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!

Featured On

Inc Magazine Logo  

Sitepoint logo  

CSS Tricks logo   

webdesignerdepot logo   WPMU DEV logo   

and many more!


Get Started Now With ShutterstockShutterstock

Best Rated Caching Plugin

Make your website faster 

Monstrous B-Day Party

CLICK HERE for discounts!

Monstrous bday party

How to make your website FAST!

Step-by-step - free email course, how to make your website load in less than 1 second 


The Outstanding HungryJPEG Bundles

AWESOMENESS! Bundles of premium font + graphic packs at more than 96% OFF!  Get a bundle for just $9 - ONLY!

The Hungry JPEG Awesome font bundles


Work with

CollectiveRay (formerly known as DART Creations) is interested in developing partnerships with mutual benefit. If you like the stuff we publish and would like to develop a relationship, we'd be happy to hear from you. Go on - drop us a line - we'd love to hear from you :-)


Disclosure: CollectiveRay is funded personally out of pure passion for helping people working with websites. We do however generate some income through recommendations of products. This means if you click on a link and purchase an item we link to, we will receive a small sum out of that sale. We usually partner with vendors to make your purchase cheaper than buying direct.


InMotion Hosting CollectiveRay Deal

who are we?

CollectiveRay is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run - a website for drone hobbyists.

David attard

Follow us on Social

Follow us on Facebook   Subscribe to our RSS Feed   Follow us on Twitter


Where are we hosted?

This site is proudly powered by FAST VPS InMotion Servers and given an insane speed thanks to StackPath CDN!

Web Hosting stackpath


Popular Content

Joomla extensions to take your website to the NEXT level

Is your Joomla website reaching its full potential? We install many of these extensions on almost ALL of our Joomla sites - why don't you check them out our list of Joomla Extensions and see whether you can take your site to the next level?