Some times coders or WordPressers needs to run a PHP code in their site to but pure WordPress does not support running PHP codes. But Insert PHP plugin will help you running any PHP code within your blog page or post simply by inserting your PHP code in the post or page body without modifying any file and does not need any coding skills. Just copy and paste PHP code!
Insert PHP WordPress Plugin
With Insert PHP plugin, WordPress will run any embedded PHP code quickly and without any problem. So WordPress simply can do pretty much anything PHP could do if it was embedded in the PHP templates. Another good feature in Insert PHP plugin is the plugin code itself; the code is short, less than 30 lines and all in one file for quick loading and running, so it will not slow your site loading.
Installing Insert PHP plugin
Manually Plugin Installation:
- Download Insert PHP plugin from WordPress.org Plugin page
- Go to WordPress Admin Panel → Plugins → Add New → Upload Plugin [top left].
- Click “Browse” or “choose file” → select the Plugin archive which you have downloaded in step #1 → click “Install Now”.
- Wait for file to be uploaded and then click “activate plugin”.
Automatically Plugin Installation:
- Go to WordPress Admin Panel → Plugins → Add New.
- In the search area type “Insert PHP” and click Enter.
- In the search results choose the plugin called “Insert PHP” and click “Install Now”.
- Wait for file to be downloaded to your host and then click “activate plugin”.
Using Insert PHP plugin
Insert PHP is very simple and easy to use; To use it, just paste the PHP code into WordPress visual editor and then replace the opening php tag
[insert_php] and replace the closing tag
[/insert_php] in your PHP code and you’re good to go. It can be that simple.
Looking for php 7 hosting? read this: Best PHP 7 Hosting providers compared
Examples of use:
- You can use Insert PHP to Publish local time (users’ computer clock settings being unreliable).
- Also you can use it to Insert output of a PHP script, or just to run a script whether or not it generates output.
You can use it to run any PHP code in WordPress posts and pages, so there is no limit to what you can do with it!