OpenLampTech issue #125
WP custom post types | PHP is a toilet? | Not using WP coding standards | Using SQLite | Drupal 11 requirements.
Thank you for reading the OpenLampTech newsletter!
If someone awesome shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
OpenLampTech has sponsorship opportunities for your brand, product, or service in the weekly newsletter. As an independent publication, collaboration is very affordable.
All commentary and opinions are mine unless otherwise quoted.
The Ultimate Guide to WordPress Custom Post Types
Custom Post Types or CPTs are one of the features that make WordPress more than just a blog. WordPress has many built-in CPTs that you know about and some you might not. Particularly in new(er) WordPress versions. This is a very good deep dive into WordPress CPTs. Learn the ins and outs of them including creation, access, and more.
[WP Mayor]
I don't remember how I found this or where I saw it but it's a tough one to nail down. I looked the code over several times and never came up with anything. And, I like to consider myself proficient in PHP (at the very least) and better than average in SQL. Odd MySQLi bug here. Comment back and let me know if you figure it out and I'll share it with the community here. Maybe the LIMIT
clause is getting a negative number somehow?
Why I don't use WordPress Coding Standards?
Very interesting. I'll admit, I do like the ‘Yoda conditionals’ WordPress way (and often find myself thinking in those terms in other code bases). However, it aggravates me to no end with the whole extra space around function parentheses and arguments. Yet, I'm unbiased when it comes to the long array syntax (array(1,2,3)
). I'm just as fine using [1,2,3]
also.
Surely this means a “necessity”?
And, we should also flush, as a necessity?
Here is a quote directly from the source article:
“So, in typical use, PHP doesn't maintain any state between executions.
Everything gets flushed away at the end.”
There is plenty of this analogy to go around but more importantly, how it applies to PHP. Once you read it, it will make better sense.
Drupal 11.0 will require PHP 8.3 and MySQL 8.0
MySQL v8 is feature-rich and the fact that Drupal 11.0 will require it can only be a good thing.
Other notable PHP/Webserver/Database highlights:
Webserver: Remove Windows support in production
PHP: v8.3 is required and older versions are not supported
Database: In addition to MySQL v8, MariaDB 10.6, PostgreSQL 16, and SQLite 3.45 are all supported
Why you should probably be using SQLite
I recently wound up on an X thread where someone asked when to choose SQLite over other databases like MySQL or PostgreSQL. And I happened upon this article.
While I know SQLite is powerful in its way, I don't know that it is on the level of other solutions such as MySQL, PostgreSQL, and Oracle. However, I will by no means sleep on SQLite and will consider it myself for future projects.
Having the entire database in one file has got to have its advantages.
Preemptive Clarification: No RCE Vulnerability in Upcoming April 2 Report
I've tried the free version of Breakdance on a couple of local WordPress site builds so I'm on their [product] email list. Although I'm not using Breakdance at this time, this is interesting.
One of Breakdance’s recent emails pointed to this article, clarifying (or defending against) a supposed RCE vulnerability within the page builder.
Based on my (limited) understanding, an RCE vulnerability is being published for a feature that already exists and is documented within the page builder.
Looks like the feature is not an RCE vulnerability according to Breakdance’s stance.
[#Affiliates] - Your support keeps the OpenLampTech newsletter free for readers
Take your Laravel applications to the next level with Battle Ready Laravel by Ash Allen. Learn how to improve the performance, maintainability, and security of your Laravel projects in this e-book.
Ultimate Laravel Boilerplate to help other indie hackers deliver their SaaS in hours. Get started with LaraFast today!
Thank you for reading. I hope you have a great rest of your week.
Take care.
Josh Otwell
OpenLampTech is a reader-supported publication. You can support the publication with a virtual coffee for as little as $3 (USD).