Most of WP core is written in PHP which is why it’s natural for WordPressers to want to at least know what PHP is. Gather around, guys, we’ll tell you.
What’s PHP anyway?
Basically, PHP is the open source programming language in which WordPress is written.
According to W3Techs, PHP is used by over 83% of all websites using server side language over the internet. Wikipedia says PHP is “a server-side scripting language designed for web development.”
Let’s break down the definition.
Server-side just means that the visitors of your site never see the PHP code that runs your WP website: it is executed/processed on your server. The visitors just see the end result in HTML.
What’s your site’s PHP code? WordPress itself with a bunch of other classes, functions, methods, and hooks, along with any installed themes or plugins.
PHP 5 or PHP 7?
You can use different versions of PHP. 10Web supports PHP 5.6, 7, 7.1, and 7.2 since although PHP 7 is really fast and more secure, a lot of sites still run the 5.6 version. You can pick your PHP version from 10Web dash with a single click:
That being said, 5.6 is actively nearing its end and will soon stop receiving security support. Our advice here is to use at least 7.
PHP use in WordPress
People learn better if they see things for themselves so download a WordPress copy from WordPress.org, and open the ZIP file:
As you see, most files are PHP. In the same vein, if you download a theme it will be mostly made up of PHP files:
Each file corresponds to its logical function:
comments.php controls the look and functions of the comment section;
404.php controls the look/functions of the Not Found page;
archive.php is responsible for the archive;
Whenever your site gets a visitor, your web server takes these PHP files responsible for various parts of your site, puts them together as your theme dictates, and delivers the complete HTML output to said visitor’s browser.
Plugins work in a similar manner!
So, do you have to know PHP?
Probably not. Sure, if you want to create your own plugins or themes or tweak an existing plugin a certain way, you may need to learn some PHP but most of the WordPress users do perfectly fine without it.
Most tools and features you need are already there, waiting for you to choose them, download, and use.
There’s no harm in knowing the basics of PHP though. Even if it’s just to understand how your site is powered.
Have any PHP-related questions? We most likely have the answers. All you have to do is write them in the comments.
Back in May 27, 2003 Matt Mullenweg and Mike Little created WordPress, a platform which was to change the direction and trends of all websites. WordPress has kept climbing higher and higher on the ranking lists of top CMS ever since. At the age of 15, WordPress, with 75 million websites and 58.7% market share is, without doubt, the leading CMS on the market. Small blogs and personal photography websites, startups and world’s top companies alike have decided on WordPress when creating their websites. Here is a list of 10 absolutely gorgeous websites you probably have heard about, but might not know were created with WordPress. 1. Katy Perry “This is the part of me That you’re never gonna ever take away from me Throw your sticks and stones, Throw your bombs and your blows But you’re not gonna break my soul,” sang Katy Perry once and has lived according to…
When planning the structure of your new WordPress blog, make sure to add these 10 features: Engaging homepage, Post categories, SEO-friendly pages and posts, Author pages, Subscription, Reading time estimation, Ads, Comments, Contact form, 10Web
Speed /spi:d/ (n.) the rate at which someone or something moves or operates or is able to move or operate. It a drag having to wait for a month to receive a letter from your lover or travelling 3 hours to get somewhere to have your fancy dinner. That’s why speed is considered one of the most important criteria when measuring quality of a service. Your website isn’t an exception. A slow website with blank error pages isn’t what you need, unless you’re, like, trying for zero traffic. Your website speed, often referred to as “website performance” is the average amount of time it takes for the content of your webpages to be displayed on the screen of the browser requesting access. But when can you know for certain that your website speed is good enough? Where is the limit of a user’s patience? To understand the phenomena of the…
Want to learn 📖 how to secure your WordPress website 🤔? Use 10Web security service, as a part of 10Web all-in-one platform, to ensure your website is safe 🛡️.