Changing permissions for suPHP / FCGI setup server

If you switch from mod_php (DSO) to suPHP or FastCGI or even LiteSpeed API if using CloudLinux you will notice issues with 500 errors on pages.
SuPHP doesn’t allow having files with permissions greater than 755. And usually everything that’s running with mod_php is 777. Both folders and file.
So what to do yo quickly change every folder to 755 and every file to 644?

find . -type d -print0 | xargs -0 chmod 0755
find . -type f -print0 | xargs -0 chmod 0644

The first one will find all directories (-type d) and chmod them to 755.
The second one will find all files (-type f) and chmod them to 644.

Problem solved.