How to Run Custom PHP Code in WordPress

WordPress offers plenty of functionalities even to the basic users, but in order to extend these functionalities and make your wordpress site stand up on its hind legs and literally wag its tail for you, you would require some PHP code to be added to your site. Integrating PHP codes is quite simple as all it takes is just a simple plugin to enable you to write the code directly into the wordpress content editor area. Here we have explained the steps to run custom PHP codes in wordpress with the use of the Exec-PHP plugin.

The first thing you need to do is download the plugin from the plugins directory and upload it in to your wordpress admin panel using the ‘add new plugins’ option under the plugins tab in the menu bar. Once the plugin is uploaded, activate it and now your wordpress site is ready to accept the PHP codes in the excerpt or content area of your posts. The plugin enable you to add the PHP codes with traditional PHP tags and lets you execute them when the page is displayed. The code is evaluated using the PHP eval() run-time function when the page is accessed.

How to Run Custom PHP Code

The plugin can be configured to work on a multitude of platforms such as text widgets and so on. To be able to do this access the plugin configuration menu as shown below and enable the options you require. You can also enable the security settings here in the configurations menu.

If you only need the administrator to run PHP codes in the articles or text widget area check the corresponding box next to it. You can also configure the plugin to accept and run PHP code entered by any user. When you’re all done be sure to save changes and rerun the admin panel to start running PHP codes.

PHP Code in WordPress

Leave a Comment

fifteen − 12 =

Hurry Up !!!

BIG Discounts &
Great Savings on

Popular WordPress Themes of Top Developers
* Terms & Conditions Apply