echo -n > /home/base/logs/php_error.log
That’s it. Your file is empty now. You can use VI Editor. First, open the file that you want to empty with vi editor. I use my php_error.log file for example.
vi /home/base/logs/php_error.log
On the first line, type “dG” without quotes. It means delete globally on VI Editor. Then quit with “:wq” without quotes of course