Home » Guides » How to fix “lessphp fatal error” for a WordPress site

How to fix “lessphp fatal error” for a WordPress site

Migrating your WordPress site to another location should be an easy process: you just have to export your database, import it to the new host, move your files there, configure everything and make the new site live. However, there are some steps that, when not done right, could return several problems that cause trouble and lead to unsuccessful site transfers. Due to unsuccessful site transfers your WordPress site may not load properly or can give errors. Here we are going to see how to fix “lessphp fatal error” which mostly occurs after a WordPress site migration from one host to another.

Do you see an error  “lessphp fatal error: load error: failed to find bootstrap.lesslessphp” and “style.less.cache”  on your WordPress site after migration from one host to another?

Generally lessphp fatal error occurs because of two files: bootstrap.lesslessphp & style.less.cache. Also, the error is common when you are developing with Twitter Bootstrap (LESS) and you might notice that the changes made in .less files do not reflect immediately. The most common fix for cache issue is to clear the browser cache, but that fix is not going work for fewer cache errors. So how do you solve this error? Well, here is how.

Fix for lessphp fatal error

To fix the issue, you need to delete .cache files mentioned in the error message. To do that, go to your WordPress theme folder path wp-content/themes/mytheme and delete these files.

Warning: Make sure you are not deleting files style.less and bootstrap.less. DELETE ONLY less.cache files.


Now check your WordPress site in a browser and for sure it will load without those errors. Don’t worry about the deleted files. Go back to your WordPress theme folder and check for those .cache files. You will see they have been generated again.

Hope this article will help you to fix the given error easily.

Leave a Reply