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:
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
#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...
ā”ļø Read this postā¦
āļø 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
ā”ļø Read this postā¦
āļø 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.
ā”ļø Read this postā¦
āļø How to Manipulate Text in PHP With These 9 Functions
#php
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.
ā”ļø Read this postā¦
āļø Why Developers Hate WordPress
#wordpress #php
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.
ā”ļø Read this postā¦
āāā 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! š
Something extra
š 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.
Take care.
Joshua Otwell
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.š°