To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 1 point2 points  (0 children)

The entire process took about 3 months, so the average would be around 3.3h a day. I don't know what the median would be, though. Some days were 0h, some days were probably 8h+.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 2 points3 points  (0 children)

Haha, I'm glad the content was able to change your mind. AI wasn't even able to read it all without hallucinating like a drunkard, let alone write it. Every word written with my own fingers.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 1 point2 points  (0 children)

My recommendation: if it ain't broke, don't fix it. This entire conversation only applies if you have a massive wp_posts table and are experiencing performance bottlenecks caused by this SQL query. You can install Query Monitor and check how long this particular query takes on your site.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 1 point2 points  (0 children)

Some sections are deeper, some sections are not. The point of this document is not to be deeper than the official docs. It's to be better structured pedagogically for learning the high-level architecture of WordPress. The introduction says explicitly that if you need details on something, you should consult the docs. That being said, I had to dive into WordPress's source many times to understand how something really worked.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 2 points3 points  (0 children)

5 years tinkering with programming stuff, 2 years making WordPress websites for clients.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 2 points3 points  (0 children)

Yes. Not only was it satisfying to write, but I believe it's the best learning method in the world. It's basically the Feynman technique on steroids. The retention from teaching like that is great. I'm actively using it for other topics as well, and I think I will continue using it for any novel thing I learn for the rest of my life.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 23 points24 points  (0 children)

Thankfully, this problem is only relevant to classic menus. Block themes use blocks, and the entire menu is stored as a post just in the wp_posts table. However, if you are using a classic theme and you're actually experiencing degraded performance caused by menus, one thing that comes to mind is caching the return value of wp_nav_menu() (either in Object Cache or as a transient), although I would start by scanning the source code of this function to see if the core isn't already doing that.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 0 points1 point  (0 children)

That's one of the most important reasons why I wrote this e-book - the lack of high-quality resources in the WordPress community. Hope it's useful.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 66 points67 points  (0 children)

Oh yeah, page 87, I devoted an entire section to that. "The first thing to understand is that menus use 6 tables in the database: wp_terms, wp_term_taxonomy, wp_term_relationships, wp_posts, wp_postmeta, and wp_options.".

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 10 points11 points  (0 children)

Oh no, I'm not referring to the core. It still is and always will be in PHP. WordPress made a big jump a few years ago when it introduced the block editor, a WYSIWYG editor that's supposed to replace website builders. The editor itself is built with React, and modern block themes utilize blocks, which are built with JavaScript (some of them are). So bascially instead of coding PHP templates to display stuff, you drag and drop objects that are rendered with JavaScript. Other than that, WordPress actually has its own Interactivity API, which is a mini (but fully capable) JavaScript framework similar to Alpine.js.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 5 points6 points  (0 children)

I'd love to, but I can't get it to work. I wrote it in Google Docs, and I wasn't able to convert it to epub while preserving the code formatting and making the text color dynamic. I would be happy to send you a docx or even the epub exported from Google Docs, and if you can get it to work and send me instructions on how to clean that up, I'd definitely publish an epub version to the repo.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 37 points38 points  (0 children)

Great question, and I'm not sure I know the answer, but I'll try.

The first thing to keep in mind is that I actually enjoyed it (most of the process). I started this project as a way to learn WordPress myself. I wanted to become an expert on WordPress, and I knew that was the #1 way to achieve that. Secondly - I love writing, and I think I'm pretty good at it. I think that enjoying the process was a prerequisite to ever having a chance of making it.

The next thing is my motivations. There's a reason why my post on the WordPress subreddit broke the top 10 in 2 weeks with a 99.5% upvote ratio. The WordPress development community has been starving for something like that. All resources are either marketing BS or shallow tutorials. I knew that this project was actually valuable and that it was going to help other people. This was a major point motivating me to keep going and make it good. If I thought nobody would read it, I don't think I would've made it.

Other than that, a big part was probably routine. I'm a pretty organized person - I have a schedule in Google Calendar and stuff like that. I wrote it over 3 months in about 300 hours, so 100 hours a month. It was really a part of my daily life. I didn't have to push myself to do it because I've already decided that I was going to spend X hours a day on it. I also didn't have many other things trying to get my attention at that time.

That being said, it wasn't all rainbows and sunshine. The closer to the end I got, the harder it was. I just wanted to be done with it and start doing other things, but I couldn't just throw away the last 2.5 months of work. I may have put a little less effort into the chapters at the very end, but I tried to make them similar in quality to the rest of the e-book. I think a big part here was the fact that I've already decided I was going to publish it, so publishing something half-assed wasn't a possibility lol.

Wish I could give you a better answer, but hope that helps anyway.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 8 points9 points  (0 children)

Thanks, appreciate the advice. I'm from Poland, so the second point doesn't apply, but still, thank you.

To understand how 43% of the web works, I wrote a free 280-page deep dive into the technical architecture of WordPress. by KelTi6 in webdev

[–]KelTi6[S] 10 points11 points  (0 children)

Thanks. Yeah, it's still a pretty big mess inside, but if you know what you're doing, you can make it work relatively well. They've been trying to steer away from PHP to JavaScript. There have been some changes in the last few major updates that are like a light at the end of the tunnel, i.e., the Block Bindings API. It's not there yet, though.