What is Flush function in PHP ? Why should we use that function on WordPress website/blog ? On using it, how could it improve the WordPress site ? Flush in general terms indicate rinse, clean, free flowing etc. So same in WordPress, when using PHP Flush function on your WordPress header php file, you will be able to speed up your WordPress blog.
The PHP Flush function on WordPress will improve the site performance speed. The Flush function simply forces your web server to send your website’s header before sending the rest of the content. When a user access your site, it normally takes atleast 10 secs to load the website completely.
When you use PHP Flush function, the partially ready HTML files from the backend are served first to the readers in lighting speed and at the mean time, the server starts fetching other files and displays completely. It helps readers not to remain their browsers idle when the server is fetching for entire files to display, rather it shows the ready HTML files first and then the rest of files such as stylesheets etc.
How to add flush() function to WordPress ?
Open your WordPress admin dashboard
Open up the header.php file
Find the tag
Insert the function right after it.
Save the file
| For a limited time I'm sharing some select Tips and Tricks and How-To Guides for FREE. |