OpenLamp.tech Issue #2
PHP Abstract Classes; WordPress SQL Injection; WordPress Database Errors; PHP String Functions; Why Devs Hate WordPress
Hey glad to have you here! 👍
If someone shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
Thanks for reading OpenLamp.tech! Subscribe for free to receive new posts, be part of a great community, and support my work.
Once again, I have curated some fantastic reads for you this week. But before we get started…
🔎 Question for the community
I’m currently working on a redesign of my WordPress site, Digital Owl's Prose, using DevKinsta as my local development environment. My site is hosted on WordPress.com and I originally set up my site to display blog posts on the homepage.
So my blog URL currently looks like this: joshuaotwell.com/blog-post-title
As part of the redesign, I’m making a dedicated Blog page for my posts so the URL's will be: joshuaotwell.com/blog/blog-post-title
I have almost 4 years (50 posts/year) worth of posts that the URLs will have to change to once I migrate my new design over.
What is the best way to accomplish this without a hit to SEO or making all my blog posts “broken links”?
I’ll also have to set up 301 redirects to point to the new blog posts URL links so any tips on that will help as well.
Thank ya much 🙏
This Week’s Picks
✔️ Interfaces vs Abstract Classes in PHP
I need to think more about Abstract Classes when programming in PHP. I just honestly don't. And I know it is because I'm still learning about them and how best to use them.
Thanks to this fantastic write-up, I am starting to understand them a lot better...
✔️ SQL Injection: A Beginner’s Guide for WordPress Users
#wordpress #php #mysql
In my opinion, Kinsta publishes some of the best help and information articles and blog posts. Especially in the WordPress space. Which makes sense since they are one of the premium managed WordPress hosting providers.
As expected, Kinsta provides a highly-detailed blog post here with explanations of:
What SQL Injection is
The different types of SQL Injection
How to mitigate the risk of SQL Injection
WordPress-specific measures to keep your site safe from SQL Injection
✔️ How to Fix “Error Establishing a Database Connection” in WordPress
#wordpress #mysql #php
I've faced this error myself. On one of (and only at the time of writing) my freelance projects, the client site went down and was displaying the dreaded "Error Establishing a Database Connection".
I ultimately got lucky and was able to just repair the MySQL database using visual tools provided by the hosting provider and all was well (lucky me!).
This article has 5 different suggestions you can try if you need to tackle this specific problem with clear explanations for each.
✔️ How to Manipulate Text in PHP With These 9 Functions
In web development, we are always processing text data in some shape or form. Be it working with submitted form data or parsing strings. Thank goodness there are PHP string functions to help with this task.
This post covers 9 useful and common PHP string functions you'll likely want to use when processing text data. Each has a clear and understandable example.
✔️ Why Developers Hate WordPress
This one hits home with me like no related article has that I've read of late. I want to one day become a freelance Developer myself. With an evolving base in MySQL and PHP (with CodeIgniter), and managing my own WordPress site, it only makes sense to keep WordPress development as an option.
But I also realize there are essentially 2 types of WordPress developers: Page Builder/Plugin Assembler, and WordPress core PHP developers.
Currently, I consider myself more of a Page Builder/Plugin Assembler as I’ve not (yet) doubled down and learned WordPress-specific PHP.
This blog post covers some great points on both fronts and addresses some of the common complaints about them as well.
⭐⭐⭐ Note: Some of the posts I share in this newsletter, I read and enjoyed on Medium. If you are not yet and member and wish to join the platform, I would be more than grateful if you would use my sign-up link. At no extra cost to you, I will receive a small portion of your membership fee when you sign up. Thank you! 🙏
📖 I want to share a link to a new book I noticed in my Feedly feed, CodeIgniter 4 Foundations. If you happen to get it before I do, share your review with me. Thanks!
Did you enjoy this issue of OpenLamp.tech? Please share it with others so that they can enjoy the content as well. Thank you!!!
Please “Reply” and let me know what you think of this issue of OpenLamp.tech.
What do you want to see more of?!?
What do you want to see less of?!?
I’d love to know!
Also, share with me links to your published blogs and articles so that I can read them and possibly include them here in the newsletter!
Thank you for reading. I hope you have a great rest of your week.
Visit my blog Digital Owl’s Prose, where I write regularly on CodeIgniter, PHP, and SQL. I’m also active on Medium, LinkedIn, Twitter, and Instagram.
Want to support this newsletter and my work? Drop some spare change in my Tip Jar.💰