Exploring PHP Basics

WordPress requires PHP in order to work; therefore, your Web hosting provider must have PHP enabled on your Web server. If you already have WordPress up and running on your Web site, you know PHP is running and working just fine. Currently, the PHP version required for WordPress is version 4.3 or later.

image In the very near future, WordPress will drop support for PHP version 4. When this happens, version 5 will be the only version supported by the WordPress platform. Ask your Web host to upgrade you to PHP version 5 sooner rather than later because most WordPress developers (for plugins, themes, and so on) base their development practices on PHP version 5.

Before you play around with template tags (covered in Book VI) in your WordPress templates or plugin functions, you need to understand what makes up a template tag and why, as well as the correct syntax, or function, for a template tag as it relates to PHP. Additionally, have a look at the WordPress files contained within the download files. Many of the files end with the .php file extension — an extension required for PHP files, which separates them from other file types, such as JavaScript (.js) or CSS (.css).

As we state earlier, WordPress is based in PHP (a scripting language for creating Web pages) and uses PHP commands to pull information from the MySQL database. Every tag begins with the function to start ...

Get WordPress® All-in-One For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.