Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP

Matt Campbell
Matt Campbell
9,767 Points

Build a CMS

Think I touched on this a while back when I was thinking about CMS's and the likes of WordPress.

What I'm after today, is some input from the Treehouse guys and the community.

Firstly, is Randy Hoyt or anyone planning on doing a course on building a CMS? While the likes of WordPress are great, especially if combined with Zac Gordon's teachings and sites can be built from scratch, what I want to build is massive and I need complete control over absolutely everything.

Second, and this is where someone else may be able to help, I'm trying to find a decent tutorial online somewhere. Nothing is living up to the standards Treehouse sets. Anyone found one that is on a par with Treehouse?

Hope for lots of replies to this.

Thanks.

6 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hi Matthew,

I would suggest following the rails videos where they build a social network, since this could help you get a foundation for building custom web applications, which is what a CMS is.

That I know of there are not plans to build an entire CMS from scratch since this is such a HUGE task and one that isn't usually done if someone just wants a CMS.

As the PHP videos evolve and continue to be released they will also provide you with the fundamentals for building your own app using PHP.

I'm curious what it is about your site that makes you feel a premade CMS won't work. This is a not uncommon approach to want to build your own CMS, but to do it well is much more work than most people realize. Using an existing CMS (or at least a framework) and extending it with plugins or modules may be a better approach.

I have seen a few tutorials that go over how to build a simple CMS, but I assume you've found these and feel they're a little too basic.

Hope that helps!!

A CMS is available for you to use because of how customize-able it is. Most are open and free. Creating a CMS from scratch is a gigantic task that you just cannot do by yourself. You need people testing it in a variety of ways, with security being a main issue. You simply can't beat anything made by hundreds of people working on it. You just don't have the time. It's the harsh and bitter truth, and it's something that personally took me a long time to realize as I wanted to code all of my websites from "scratch". Good luck!

It is terribly sad, because all existing CM systems are extremely horrible IMO. I am actually fazed how people have such low standards in terms of functionality and possibilities.

kyle rees
kyle rees
1,480 Points

heres 2 videos that will help you get the basics down

first up is sc00bied00s video tutorial on creating a cms using modern teqniques he takes the object oriented aproach to making a cms and guides you through the process http://www.youtube.com/playlist?list=PLD860A854D9045388

next up is adam khoury his video teaches a different method for cms creation but it will still help you get the basics of what a cms is http://www.youtube.com/watch?v=UUMq-yBVlrM

they may or may not compare to what you might be used to from treehouse but then again i learnt the basics of php from theese vids so there somewhat good

Matt Campbell
Matt Campbell
9,767 Points

Thanks for the links, I'll have a look at those. The more content I can absorb the better. Slowly but surely I'm learning the principal of content management!

Matt Campbell
Matt Campbell
9,767 Points

In response to Zac Gordon and Ernest Grzybowski.

I'm very happy with WordPress but WordPress is designed to cater for as many possible applications as possible. Hence, in my opinion, there is a lot of overburden in terms of what I want it to do and I could simplify the whole process and build something that specifically caters for my sites needs.

What I'm building is a rather hefty ecommerce and media site. The site needs a news, reviews, media(YouTube account linked) section, 3 or 4 core ecommerce areas, each section could be standalone store. WordPress works great but having to have loops all over the place and the actual content management is a nightmare. What I'd want from my CMS is a basic directory system such as Windows. That way I can easily sort and organise my data.

It's not a super complex CMS as there only needs to be one user and it really is strictly to manage content. Plus, I want to take what Zac teaches in PHP for the store but don't really want to go down the road of making an ecommerce plugin for wordpress.

Secondly, I think it's just a really good excercise to know how to do these things, even if it is just a simple CMS that's built.

A CMS along the lines of GetSimple CMS may be what you are looking for. It is much simpler than WordPress, so even if you want to write a CMS from scratch you could look at the code for GetSimple to get an idea of how complex a CMS, even a simple one, really is.

You are right in that WordPress is designed to work for everybody, as is most packaged software. However, understanding WordPress, how it works, and how plugins work within WordPress would likely be easier than writing your own CMS from scratch.

I hope this information is helpful to you and good luck on the path you ultimately decide!

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Couple quick thoughts here since you're doing an ecommerce site:

  1. I assume you've looked at WooCommerce and Magento, etc.
  2. You will need to make sure your site is PCI compliant. There are strict rules for any sites that process payments online.
  3. I'd suggest you look into Stripe as a payment gateway. Their API is pretty simple.

I agree that this is a great project to take on to learn how to build custom sites, but launching a full ecommerce site definitely enhanced the need for security and heavy testing unless you're just using a simple Paypal cart.

Matt Campbell
Matt Campbell
9,767 Points

I've looked at dozens of ecommerce plugins. I had a business before that I was trying to use WordPress to build an online store for but was very overwhelmed by the sheer volume of choices and frustrated by the inability to make it how I want.

I'm signed up to WPMUDEV which is fantastic and I'd encourage anyone to pay the initial month's fee, download everything and then quit it because it is fiendishly expensive once you've downloaded everything you want. It's going up to $99 a MONTH!!!! But I digress.

I am really struggling to decide in which direction to go. I to take all the teachings that I've learnt here and use them in my site which I can then evolve over time, along with my other sites and the dev work that will come off the back of one site. I feel while I could do it all in WordPress, I'm limiting myself considerably. Unless I build an ecommerce plugin to my liking, along with a custom theme and anything else that's required, plus getting other plugins to work with everything else.

It all sounds like it's going to be about the same amount of work with ultimately less control then just building it completely from scratch.

I have found a 126 part tutorial on YouTube, and while it is brilliant and gets a CMS that is proper at the end, it doesn't compete with Treehouse teachings. The Treehouse formula can't be beaten in my opinion and all I've done for the last 2 months is absorb coding languages through text, video and experimenting with code.

I understand the need for security, it is key, and hopefully I'd be able to just implement a payment gateway that I could embed in the site somehow? I don't know.

I really appreciate all the comments and suggestions, just stuck on which direction to take!!!!

kyle rees
kyle rees
1,480 Points

one thing that helps is try where you can to do stuff differently to the tutorial and try and hack the example cms into something of your own creation like for instance hack the articles system to instead be a side bar widget that shows news or hack it to be a system for generating nav menu items so you learn the concept behind how the cms works and not just learn how to copy his code when your done compleatly forget everything he showed you and try and go out on your own and recreate his cms but without using his code exactly a cms is insanely simple once you break it down to its core components

Matt Campbell
Matt Campbell
9,767 Points

Hi kyle rees.

What you've said is what I do with all my studying, unless the tutorial isn't to a standard which actually teaches principals.

CMS isn't necessarily complex but takes time to understand how to build it to suit the requirements it's to be used for.