PHP for Beginners: Building Your First Simple CMS GitHub
Thursday, April 4, 2019

PHP for Beginners: Building Your First Simple CMS GitHub

Library

Welcome to the Treehouse Library

This is a sample catalog of all the courses we offer. Browse by topic or difficulty. Sign up today and get access to our entire library. Treehouse students get access to workshops, bonus content, conferences, and more.

Ready to start learning?

Treehouse offers a 7 day free trial for new students. Get access to 1000s of hours of content. Learn to code, land your dream job.

Start Your Free Trial

  • Newest

    • Newest
    • Oldest
    • Alphabetical
    • Difficulty

  • Content type

    • All Types
    • Course
    • Workshop
    • Practice
    • Conference
    • Bonus Series
  • All Topics

    • All Topics


    • Android



    • APIs



    • Business



    • C#



    • Computer Science



    • CSS



    • Data Analysis



    • Databases



    • Design



    • Development Tools



    • Digital Literacy



    • Go



    • HTML



    • iOS



    • Java



    • JavaScript



    • Machine Learning




    • PHP



    • Python



    • Quality Assurance



    • Ruby



    • Security



    • WordPress

PHP

PHP is a widely-used general-purpose scripting language that is especially suited for Web Development and can be embedded into HTML.

    • 1

    44 min

    Course

    Environment Variables with PHP

    In the lifecycle of an application, there are multiple environments such as Development, Testing and Production. Each environment may have its own unique sources and credentials that need to be managed and secured. Environment variables are accessible to any programming language, and allow applications to adapt to their environment while keeping credentials secure.


    • PHP
    • Intermediate

    • 5 min

      Practice

      Practice Hashing Passwords in PHP

      When storing user’s passwords, the most important thing to keep in mind is that you should always hash your passwords. Hashing is a one-way process of securing data with a strong algorithm. As of 2017, the accepted hashing algorithm is bcrypt.


      Viewed
      • PHP
      • Intermediate
        • 1
        • 2
        • 3

        2 hours

        Course

        Designing Interfaces in PHP

        An interface is a type of contract that assures that certain abilities are available on on a particular object class. We’ll write and extend multiple interfaces, then implement them to design and match functionality. Interfaces do not store any implementation details themselves. To share implementation details between classes, we harness the power of inheritance. Abstract classes prevent a parent class from being directly instantiated, while at the same time defining methods that MUST be implemented in any extending children.
        This course will combine interface contracts with class hierarchy to leverage the benefits of each concept. We’ll explain the differences between interfaces and abstract classes, and give you the knowledge you need to build and implement both in your own projects.


        • PHP
        • Intermediate

        • 5 min

          Practice

          Practice Including PHP with HTML

          Practice using PHP to include variables, files and dates within an HTML page.


          Viewed
          • PHP
          • Beginner

          • 5 min

            Practice

            Practice PHP if/else Statements

            Practice using if, else and elseif statements to control the flow of your application.


            Viewed
            • PHP
            • Beginner

            • 4 min

              Practice

              Practice PHP String Manipulation

              Practice creating, manipulating and outputting string variables in PHP.


              Viewed
              • PHP
              • Beginner

              • 5 min

                Practice

                Practice PHP Number Variables

                Practice creating, manipulating and outputting numeric variables including integers and floats.


                Viewed
                • PHP
                • Beginner
                  • 1
                  • 2

                  83 min

                  Course

                  Extending Object-Oriented PHP

                  You should already be familiar with writing simple classes in PHP. In this course you will learn how extend the use of these classes to reuse code.


                  • PHP
                  • Intermediate
                    • 1

                    49 min

                    Course

                    Browser Persistent Data with PHP

                    With smartphones, smartwatches and even smart appliances, the internet of things has brought us into a world to rival sci-fi novels. We’re no longer content with a simple search. We want context. We expect our devices to know our locations, preferences, desires and goals. We expect tailored suggestions, reminders and announcements. Most of the time we don’t even realize how much our devices or websites are setup to assist us until our connection is broken or we try to use a different device, and all of a sudden our history and setting aren’t there and it’s so much harder to do or find anything. Users have come to expect so much and it’s just getting worse.
                    So what does that mean to you as a programmer? How can you make your own applications “user aware”? It starts with data persistence.


                    • PHP
                    • Intermediate
                      • 1
                      • 2

                      101 min

                      Course

                      File Handling with PHP

                      PHP can do so much more than include files. In this course we’ll explore reading and writing files from a directory. We’ll also take advantage of built-in parsing functions for working with common file formats to read and write CSV, XML and JSON data.


                      • PHP
                      • Intermediate
                        • 1
                        • 2
                        • 3
                        • 4

                        2 hours

                        Course

                        PHP User Authentication

                        Learn how to implement a custom user authentication system that controls users access to web resources, using password hashing and JSON Web Tokens for security. The system lets users sign up, log in, and log out, limiting access to certain actions based on authorization.


                        • PHP
                        • Advanced
                          • 1
                          • 2

                          58 min

                          Course

                          Using the GitHub API with PHP

                          Application Programming Interfaces, or APIs, provide a method for connecting your site to a “third-party” web service. We’ll use the GitHub API to explore how RESTful APIs allow us to retrieve and update information residing on an external system.


                          • PHP
                          • Intermediate

                          • 26 min

                            Workshop

                            Dependency Management with Composer

                            In this course we’ll learn about packages, dependencies, repositories and versioning. We’ll be using a PHP tool called Composer for managing all these pieces to work together with our application.


                            Viewed
                            • PHP
                            • Intermediate

                            • 18 min

                              Workshop

                              Basic Exception Handling with PHP

                              Exceptions are the object-oriented approach to handling errors. An exception is an object that is “thrown” by your application in the event that something goes wrong. They allow you to customize how a program handles errors, and gracefully degrades an application.


                              Viewed
                              • PHP
                              • Intermediate
                                • 1
                                • 2
                                • 3
                                • 4

                                2 hours

                                Course

                                CRUD Operations with PHP

                                In this course we’ll delve into the full spectrum of database interactions. Whether the application is an e-commerce, or social network site, or even a todo app on your phone, the data needs to change over time. CRUD is an acronym that refers to the four main operations that you’d want to perform on data in a database: Create, Read, Update, Delete.


                                • PHP
                                • Intermediate
                                  • 1
                                  • 2
                                  • 3

                                  3 hours

                                  Course

                                  PHP Arrays and Control Structures

                                  This course builds on the foundational skills covered in the PHP Basics course. We’ll explore conditionals, loops and the compound variable — arrays. All of which help your write more powerful and intelligent programs using less code.


                                  • PHP
                                  • Beginner
                                    • 1
                                    • 2
                                    • 3
                                    • 4

                                    2 hours

                                    Course

                                    PHP Basics

                                    In this course I’ll walk you through the basics of the language, ranging from basic statements to conditionals. We’ll be creating a simple “Unit Converter” as well as a “Daily Exercise Program”. We’ll then finish up by combining those programs with HTML to create a personal webpage to demonstrate your skills.


                                    • PHP
                                    • Beginner
                                      • 1
                                      • 2
                                      • 3
                                      • 4

                                      3 hours

                                      Course

                                      Object-Oriented PHP Basics

                                      At a glance, object-oriented programming can appear to be far more complex than simple procedural, or inline, code. However, this doesn’t have to be the case. Because object-oriented programing is similar to the way human beings perceive the real world, using the object-oriented approach, can help you visualize the solution to a problem more easily.
                                      Object-oriented programming, or OOP for short, is a style of coding that allows developers to group similar tasks into containers. In PHP, containers are defined using classes. A class contains all the functions and variables that describe an object.


                                      • PHP
                                      • Intermediate
                                        • 1
                                        • 2
                                        • 3
                                        • 4
                                        • 5

                                        4 hours

                                        Course

                                        Integrating PHP with Databases

                                        Building a PHP-driven page is the first step in mastering PHP. The true power of PHP shines when you connect it to a data source like an API or a Database. To introduce you to databases, we’ll use an example project — a Personal Media Library application. We’ll refactor this project by replacing an associative array with a database to provide a more robust and scalable tool to store the data in the media library. In the process, you’ll learn how to use PDO — a PHP extension to communicate with a database. You’ll also learn about relational databases including how to search for data across multiple tables, as well as how to add common web site features like search forms and pagination.


                                        • PHP
                                        • Intermediate

                                        • 34 min

                                          Workshop

                                          Basic Error Handling in PHP

                                          An undeniable fact of software development is that bugs will crop up in your code and lead to undesirable outcomes. Error handling is the process of what to do when those errors occur.


                                          Viewed
                                          • PHP
                                          • Beginner

                                          • 21 min

                                            Workshop

                                            Introduction to PHP7

                                            It’s an exciting time to be part of PHP. The release of PHP7 is just the tip of the iceberg. In this workshop we’ll cover the top features and improvements to the language as well as some things to look out for when upgrading.


                                            Viewed
                                            • PHP
                                            • Beginner
                                              • 2
                                              • 3
                                              • 4
                                              • 5

                                              5 hours

                                              Course

                                              Build a Basic PHP Website

                                              This project will show you how to build a simple website using the PHP programming language. The web site, a media library, will let you organize and display your Books, Movies and Music. You could easily use this project to create a website that lets you organize and display any type of item: Branch Locations, Products, Services, Events, even Courses like we have here on Treehouse.


                                              • PHP
                                              • Beginner

                                              • 7 min

                                                Workshop

                                                MAC: Local PHP Dev Environment

                                                Also check out Windows: Local Dev Environment (https://teamtreehouse.com/library/setup-your-local-development-environment).
                                                Most developers prefer to build applications locally, on their own computers, rather than on hosted servers. Working locally allows you to work more quickly because you don’t have to wait for your changes to be saved to a remote server and you don’t have to worry about issues like internet connectivity.


                                                Viewed
                                                • PHP
                                                • Beginner

                                                • 6 min

                                                  Workshop

                                                  Windows: Local PHP Dev Environment

                                                  Visit our MAC: Local Dev Environment (http://teamtreehouse.com/library/mac-local-php-dev-environment).
                                                  Most developers prefer to build applications locally, on their own computers, rather than on hosted servers. Working locally allows you to work more quickly because you don’t have to wait for your changes to be saved to a remote server and you don’t have to worry about issues like internet connectivity.


                                                  Viewed
                                                  • PHP
                                                  • Beginner
                                                    • 1
                                                    • 2
                                                    • 3
                                                    • 4

                                                    3 hours

                                                    Course

                                                    Drupal Basics

                                                    Drupal 7 is a robust framework which is ideal for websites of any size. In this course, dive into using Drupal to create a complete website for a fictional small business called Cameron’s Coffee Stand. Create basic pages, menus, blog posts, announcements, email forms and banners, all without touching code. Customize the look of the website using themes, and learn to use Drupal’s included permissions and authentication system. Lastly, you will include your own code with a Drupal website by creating a custom module.


                                                    • PHP
                                                    • Beginner

                                                    • 33 min

                                                      Workshop

                                                      Flash Messages Using Slim

                                                      Using the Slim Frameworks Flash Messages and Session Store Middleware combined with Twig template language we will provide feedback to our users about form data and email.


                                                      Viewed
                                                      • PHP
                                                      • Beginner
                                                        • 1
                                                        • 2
                                                        • 3

                                                        2 hours

                                                        Course

                                                        Building Websites with PHP

                                                        Taking what you have learned so far with basic syntax, functions, and object oriented concepts we are going to build a simple website.
                                                        We will together build a simple personal page with an about section and a contact form.
                                                        After our contact form is submitted, we will create and send an email with the user submitted information.


                                                        • PHP
                                                        • Beginner
                                                          • 1
                                                          • 2
                                                          • 3

                                                          77 min

                                                          Course

                                                          Nested CRUD with Laravel 4

                                                          In this project we will continue to build off of the project we built in the Laravel Basics (http://teamtreehouse.com/library/laravel-basics) course. Let’s create a RESTful nested routes structure and then build out our nested controllers and all of related forms and actions!


                                                          • PHP
                                                          • Beginner
                                                            • 1
                                                            • 2
                                                            • 3

                                                            88 min

                                                            Course

                                                            PHP & Databases with PDO

                                                            Whether you have aspirations of working on a Content Management System, an E-Commerce Site, a new and exciting web app, or an API you will eventually need to work with a Database. PHP and Databases work together through the use of PHP Data Objects or PDO for short.


                                                            • PHP
                                                            • Beginner
                                                              • 1
                                                              • 2
                                                              • 3
                                                              • 4
                                                              • 5
                                                              • 6

                                                              2 hours

                                                              Course

                                                              PHP Testing

                                                              You’ve been writing PHP code for a while, but every time you push your code
                                                              into production, there’s another bug!
                                                              You have heard that there are tools you can use to test your code. Unit tests.
                                                              Test-Driven Development. Mocks. All you want to know is: Can you figure these
                                                              things out in time to help you stop working all these late hours?
                                                              This course will give you an understanding of how to use the most common
                                                              PHP testing tools to create tests that will give you confidence that your
                                                              code is working as expected.


                                                              • PHP
                                                              • Intermediate
                                                                • 1
                                                                • 2
                                                                • 3
                                                                • 4
                                                                • 5

                                                                2 hours

                                                                Course

                                                                PHP Standards and Best Practices

                                                                PHP is a flexible language with a long history. Being such a popular language for so long means there is a lot of code out there. There are many ways to program in PHP, and not all of them are as safe, performant, or maintainable as some of the older educational materials might have you believe.
                                                                Having so many options can be daunting to many developers as they grow from beginner to intermediate. Fortunately there are established best practices out there, and this course will help you learn about many of them.


                                                                • PHP
                                                                • Intermediate
                                                                  • 1
                                                                  • 2
                                                                  • 3

                                                                  66 min

                                                                  Course

                                                                  PHP Functions

                                                                  PHP Functions allow you to combine several statements of code into a ‘function’. These functions can then be called by their given name, and all of the code contained will run and return the results. This will drastically help you clean up code and use less repetitive code.


                                                                  • PHP
                                                                  • Beginner
                                                                    • 1
                                                                    • 2
                                                                    • 3
                                                                    • 4
                                                                    • 5
                                                                    • 6
                                                                    • 7
                                                                    • 8

                                                                    4 hours

                                                                    Course

                                                                    Laravel 4 Basics

                                                                    “Learning a new framework can be daunting, but it’s also exciting.” – Together we will learn the basics of the PHP framework Laravel.


                                                                    • PHP
                                                                    • Beginner

                                                                    • 29 min

                                                                      Workshop

                                                                      PHP & The Stripe API

                                                                      The Stripe API is a robust and powerful solution to e-commerce checkout systems. From a simple button to secure checkout form with validation. Together we will pair up the Stripe API checkout and PHP to create a simple but expandable checkout solution.


                                                                      Viewed
                                                                      • PHP
                                                                      • Beginner

                                                                      • 42 min

                                                                        Workshop

                                                                        Converting an HTML Site to a PHP Micro Framework

                                                                        In this live Treehouse Workshop, PHP teacher Hampton Paulk demonstrates how to convert a static HTML 5 site built on Foundation to the Silex PHP micro framework.


                                                                        Viewed
                                                                        • PHP
                                                                        • Intermediate

                                                                        Whoops! Perhaps you can try a broader search.

                                                                        Reset all filters

                                                                        Upcoming Releases

                                                                        The following items are scheduled to be released soon. You can also visit our content roadmap for more info.

                                                                          Course

                                                                          Introducing MVC Frameworks in PHP

                                                                          In this course we will build upon what we have learned about Object-Oriented Programming to build a basic website. By using the Slim Microframework, we will explore common MVC concepts without the framework hiding too much functionality out of the box.


                                                                          • PHP
                                                                          • December 2018

                                                                            Course

                                                                            Templating with Twig

                                                                            Templating languages and tools are used with frameworks like Slim and Laravel to incorporate PHP and logic into static HTML web pages. In this course we will see how to apply Object-Oriented methodology

                                                                            to views (web pages with HTML).


                                                                            • PHP
                                                                            • December 2018

                                                                            Sign in