In the past tutorials, I have shown you how to create a flat file system content management system (CMS) using Go, Node.js, and Ruby.
In this tutorial, I am going to take the same design model and build a server using PHP. Since PHP isn’t a server by itself, but is usually paired with the Apache web server, I will show you how to set up the Apache web server inside a Vagrant virtual system.
To start off, you need to have PHP installed on your system. Go to the PHP website and download the version for your system. Most Linux distributions and all Mac OS X systems have PHP already installed.
Next, install Composer, a package manager for PHP similar to npm for Node.js. To install Composer, type the following in a terminal:
php -r “readfile(‘https://getcomposer.org/installer’);” | php
With Composer installed, installing the libraries for the server is next. First, create a directory for the project with the files from Building a CMS: Structure and Styling or extract the download for this tutorial. Once set up, go to that directory and type:
composer require slim/slim “^3.0” composer require erusev/parsedown composer require zordius/lightncandy:dev-master composer require “talesoft/tale-jade:*” composer install
These lines install the four libraries that make up the server: Slim Router is the routing library to process the incoming server requests, Parsedown translates Markdown to HTML, Handlebars is the templating library, and the Jade Library is a short-hand form of HTML that I use to make the index pages for posts.
In the top of the project directory, create the file index.php. The Apache server expects the main page for the site to have this name. In this file, place the following code:
<?php // // Program: phpPress // // Description: This is a full flat file // system CMS that mimics the // organization of goPress. // Since goPress server can not // be run on a shared server, // phpPress will work there and // offer easy migration to // goPress if the site is moved // to a VPS. // require ‘vendor/autoload.php’; // // Load libraries used. // // // HandleBars: https://github.com/zordius/lightncandy // use LightnCandy\LightnCandy; // // Jade Library: https://github.com/Talesoft/tale-jade // use Tale\Jade;
The require statement allows PHP know how to load the different libraries installed with Composer. Then you tell PHP to use the LightnCandy and Jade libraries.
// // Slim Router: http://www.slimframework.com/ // use \Psr\Http\Message\ServerRequestInterface as Request; use \Psr\Http\Message\ResponseInterface as Response; $app = new \Slim\App; // // Set an Error Handler. // $c = $app->getContainer(); $c[‘errorHandler’] = function ($c) { return function ($request, $response, $exception) use ($c) { return $c[‘response’]->withStatus(400) ->withHeader(‘Content-Type’, ‘text/html’) ->write(ProcessPage($parts[‘layout’],“ErrorPage”)); }; }; // // This line will cause Slim not to catch errors. Please commit out for // production server. // unset($app->getContainer()[‘errorHandler’]);
Next, you set up the Slim router by creating an instance of the Slim app object and setting the error handler. With the error handler set, you never get debugging information when an error happens. Therefore, while developing, you need to unset the error handler. But for production, comment out the last line with unset.
// // Get the server.json information in to global site variables. // $site = __DIR__ . ‘/site’; $style = “Basic”; $layout = “SingleCol”; $styleDir = ‘./themes/styling/’ . $style; $layoutDir = ‘./themes/layouts/’ . $layout; $parts = Array(); $parts[“CurrentLayout”] = “SingleCol”; $parts[“CurrentStyling”] = “Basic”; $parts[“ServerAddress”] = “http://localhost:8080”; $parts[“SiteTitle”] = “Test Site”; $parts[“Sitebase”] = “./site/“; $parts[“TemplatBase”] = “./themes/“; $parts[“Cache”] = false; $parts[“MainBase”] = ““; // // Load relevant items in the layouts directory. // $parts[“layout”] = file_get_contents($layoutDir . ‘/template.html’); // // Load relevant items in the styles directory. // $parts[“404”] = file_get_contents($styleDir . ‘/404.html’); $parts[“footer”] = file_get_contents($styleDir . ‘/footer.html’); $parts[“header”] = file_get_contents($styleDir . ‘/header.html’); $parts[“sidebar”] = file_get_contents($styleDir . ‘/sidebar.html’); $parts[“ErrorPage”] = “<h1 class=‘Error’>There was a server error!</h1>“; // // Load everything in the parts directory. // $d = dir($site . ‘/parts/‘); while (false !== ($entry = $d->read())) { if((strcmp($entry,“..“)!=0)&&(strcmp($entry,“.“)!=0)) { $pathparts = pathinfo($entry); $parts[basename($pathparts[‘filename’])] = figurePage($site . ‘/parts/’ . $pathparts[‘filename’]); } } $d->close();
The next section of code is the creating of the $parts
hash table for storing the pieces of information used in the templates. The program then adds everything in the site’s parts directory to the hash table. That way, you can create reusable pieces to add to any page.
// // Function: SetBasicHeader // // Description: This function will set the basic header // information needed. // // Inputs: // $response The response object to be // sent to the browser. // function SetBasicHeader($response) { $newResponse = $response->withAddedHeader(“Cache-Control”, “max-age=2592000, cache”); $newResponse = $newResponse->withAddedHeader(“Server”, “phpPress - a CMS written in PHP from Custom Computer Tools: http://customct.com.“); return($newResponse); }
The SetBasicHeader()
function sets the return header for all of the pages. This sets the cache control functions and the name of the server. If you need more header information, this is where you would set it.
// // Array of shortcodes and their functions. // $shcodes = Array( ‘box’ => function($args, $inside) { return(“<div class=‘box’>” . $inside . “</div>“); }, ‘Column1’ => function($args, $inside) { return(“<div class=‘col1’>” . $inside . “</div>“); }, ‘Column2’ => function($args, $inside) { return(“<div class=‘col2’>” . $inside . “</div>“); }, ‘Column1of3’ => function($args, $inside) { return(“<div class=‘col1of3’>” . $inside . “</div>“); }, ‘Column2of3’ => function($args, $inside) { return(“<div class=‘col2of3’>” . $inside . “</div>“); }, ‘Column3of3’ => function($args, $inside) { return(“<div class=‘col3of3’>” . $inside . “</div>“); }, ‘php’ => function($args, $inside) { return(“<div class=‘showcode’><pre type=‘syntaxhighlighter’ class=‘brush: php’>” . $inside . “</pre></div>“); }, ‘js’ => function($args, $inside) { return(“<div class=‘showcode’><pre type=‘syntaxhighlighter’ class=‘brush: javascript’>” . $inside . “</pre></div>“); }, ‘html’ => function($args, $inside) { return(“<div class=‘showcode’><pre type=‘syntaxhighlighter’ class=‘brush: html’>” . $inside . “</pre></div>“); }, ‘css’ => function($args, $inside) { return(“<div class=‘showcode’><pre type=‘syntaxhighlighter’ class=‘brush: css’>” . $inside . “</pre></div>“); } );
The $shcodes
hash table contains all the shortcode functions for processing items in a web page. The functions that I wrote here are simple, but they can be more complex if needed. This gives a way of embedding more dynamic code into your web pages.
// // Function: processShortcodes // // Description: This function will expand all // shortcodes in the page given to // it. // function processShortcodes($page) { global $shcodes; $result = ““; while(preg_match(“/\-\[(\w+)(.*)\]\-/i”, $page, $match) == 1) { $num = count($match); $command = $match[1]; $cmdarg = ““; if($num > 2) { $cmdarg = $match[2]; } $spos = strpos($page,“-[{$command}“); $result .= substr($page, 0, $spos); $page = substr($page,$spos + 4 + strlen($command) + strlen( $cmdarg)); $sepos = strpos($page,“-[/{$command}]-“); $inside = trim(substr($page, 0, $sepos)); if(strcmp($inside,““) != 0) { $inside = processShortcodes($inside); } $page = substr($page, $sepos + 5 + strlen($command)); // // If the command name exists in the // shortcodes hash table, then run the // function. // if( array_key_exists($command, $shcodes) ) { $result .= call_user_func($shcodes[$command], $cmdarg, $inside); } } $result .= $page; return($result); }
The processShortCodes()
function will find, execute, and insert the results of a shortcode. This function finds all shortcodes in a page by calling itself recursively on the enclosed contents and the rest of the page.
A shortcode has the following syntax:
-[name arg]- contents -[/name]-
The name is the name of the shortcode, arg
is the arguments passed to the shortcode, and contents
are the part of the page the shortcode encloses. The -[
and ]-
act just like the <
and >
in HTML.
// // Create the HandleBar helpers array. // $helpers = Array( ‘flags’ => LightnCandy::FLAG_HANDLEBARS | LightnCandy::FLAG_ADVARNAME | LightnCandy::FLAG_EXTHELPER, ‘helpers’ => Array( ‘save’ => ‘save_helper’, ‘date’ => ‘date_helper’, ‘cdate’ => ‘cdate_helper’ ) ); // // Function: save_helper // // Description: This helper will save the given text to // the given name. That name can be use // latter in the document. // // Inputs: // $args The arguments sent to the // helper function. // function save_helper($args) { global $parts; $arg = implode(” “, $args); $hparts = explode(“|“, $arg); if(count($hparts) == 2) { $parts[$hparts[0]] = $hparts[1]; return $hparts[1]; } else { return $parts[$hparts[0]]; } } // // Function: date_helper // // Description: This function formats the current date // according to the formatting string given. // // Inputs: // $args The arguments sent to the helper // function date_helper($args) { $dateFormat = implode(” “, $args); return date($dateFormat); } // // Function: cdate_helper // // Description: This function formats the date given // according to the formatting string given. // // Inputs: // $args The arguments sent to the helper // function cdate_helper($args) { return date($args[0], $args[1]); }
The next section contains the helper functions for adding helpers to the Handlebars template engine. The helper functions are save
, date
, and cdate
. The save
function takes a name and some text. Anywhere the name given is in a macro, the text given will replace it. The date function takes the current date and formats it according to the formatting string given. The cdate
function takes a date and a formatting string. It will put the given date to the given format.
// // Function: ProcessPage // // Description: This function will process a page into // the template, process all Mustache // macros, and process all shortcodes. // // Inputs: // $layout The layout for the page // $page The pages main contents // function ProcessPage( $layout, $page ) { global $site, $parts, $helpers; // // We need a temporary file for creating the // Handlebars rendering function. You might // need to change this depending on your system. // $php_inc = “/var/tmp/handlebarsTemp.php”; // // Get the page contents. // $parts[‘content’] = figurePage($page); // // First pass on Handlebars. // $phpStr = LightnCandy::compile($layout, $helpers); file_put_contents($php_inc, $phpStr); $renderer = include($php_inc); $page = $renderer($parts); // // Process the shortcodes. // $pageShort = processShortcodes($page); // // Second pass Handlebars. // $phpStr = LightnCandy::compile($pageShort, $helpers); file_put_contents($php_inc, $phpStr); if($phpStr != ““) { $renderer = include($php_inc); $page = $renderer($parts); } // // Return the results. // return($page); }
The next function is ProcessPage()
. This function takes the layout for the page and the contents of the page. It will combine them using the LightnCandy Handlebars template engine. The resulting page is then searched for shortcodes. The resulting page after that is run through LightnCandy again. The browser receives the output from LightnCandy.
// // Setup the routes routines. // function page( $pageAddress ) { global $site, $parts; $page = ProcessPage( $parts[‘layout’], “{$site}/pages/{$pageAddress}“); return($page); }
The page()
function determines the page to send to the user. The function receives the page address from the router and calls ProcessPage()
to create the page.
function posts($postType, $blog, $pageAddress ) { global $site, $parts; $page = ProcessPage( $parts[‘layout’],“{$site}/posts/{$postType}/{$blog}/{$pageAddress}“); return($page); }
The posts()
function works just like the page()
function for post contents. The router passes the post type, blog, and page address values from the route. This function then uses ProcessPage()
to create the page to return.
function figurePage( $page ) { global $site, $parts; $result = ““; if(isset($parts[$page])) { // // A site partial was specified. Use it. // $result = $parts[$page]; }else if(file_exists(“{$page}.html”)) { // // It is a html piece. Just get it and pass it on. // $result = file_get_contents(“{$page}.html”); } else if(file_exists(“{$page}.md”)) { // // It is a markdown piece. Process into HTML and pass // it on. // $Parsedown = new Parsedown(); $result = file_get_contents(“{$page}.md”); $result = $Parsedown->text($result); $result = str_replace(“"“,“\““,$result); } else if(file_exists(“{$page}.amber”)) { // // It is a Jade (using the golang name for the // extension) page. // $jade = new Jade\Renderer(); $jade->addPath(dirname($page)); $result = $jade->render(basename($page)); } else { $result = $parts[“404”] ; } // // give the resulting page content. // return($result); }
The figurePage()
function gets the correct page content based on the name given. The function will look for a file with the .html extension. If there is one, it reads it in and sends it to the calling routine.
Next, the function looks for a .md extension. If there is one, it reads it, converts the Markdown to HTML, and returns it to the calling routine. Next, the function sees if there is one with the .amber extension. If there is one, it reads it, converts the Jade syntax to HTML, and returns it to the calling function.
// // This route handles the main or home page. // $app->get(‘/‘, function(Request $request, Response $response) { $newResponse = SetBasicHeader($response); $newResponse = $newResponse->getBody()->write(page(‘main’)); return($newResponse); });
This route function maps the main or home page for the web site. This will fire for all requests to the domain name with or without a ’/’.
// // This route handles the favicon loading. // $app->get(‘/favicon.ico’, function(Request $request, Response $response){ global $site; $newResponse = SetBasicHeader($response); $newResponse = $newResponse->withAddedHeader(“Content-type”, “image/ico”); $newResponse->getBody()->write(file_get_contents(“{$site}/images/favicon.ico”)); return($newResponse); });
This route definition maps to the specific request: /favicon.ico. This gives the favicon for the web site. It returns the image “/images/favicon.ico” in the site directory.
// // This route handles all the stylesheets loading as one // sheet. // $app->get(‘/stylesheets’, function(Request $request, Response $response) { global $site; $newResponse = $response->withHeader(“Content-type”, “text/css”); $newResponse = SetBasicHeader($newResponse); $newResponse->getBody()->write(file_get_contents(“{$site}/css/final/final.css”)); return($newResponse); });
This route gets the compiled style sheet and returns it to the requester. The compiled style sheet is always “/css/final/final.css”.
// // This route handles the loading of the scripts. // $app->get(‘/scripts’, function(Request $request, Response $response) { global $site; $newResponse = $response->withAddedHeader(“Content-type”, “text/javascript”); $newResponse = SetBasicHeader($newResponse); $newResponse->getBody()->write(file_get_contents(“{$site}/js/final/final.js”)); return($newResponse); });
This route always returns the compiled JavaScript file found at “/js/final/final.js”.
// // This route handles all the image routes. // $app->get(‘/images/{image}‘, function(Request $request, Response $response) { global $site; $ext = pathinfo($request->getAttribute(‘image’), PATHINFO_EXTENSION); $newResponse = SetBasicHeader($response); $newResponse = $newResponse->withAddedHeader(“Content-type”, “image/$ext”); $newResponse->getBody()->write(file_get_contents(“{$site}/images/” . $request->getAttribute(‘image’))); return($newResponse); });
This route processes all requests for images. The {image}
tells the router code to give the image name to the function. The call to the $request->getAttribute()
function retrieves the value.
// // This route handles all the video items. // $app->get(‘/videos/{video}‘, function(Request $request, Response $response) { global $site; $newResponse = SetBasicHeader($response); $newResponse = $response->withAddedHeader(“Content-type”, “video/mp4”); $newResponse->getBody()->write(file_get_contents(“{$site}/video/” . $request->getAttribute(‘video’))); return($newResponse); });
This route gets all the video requests and sends them to the browser.
// // This route handles all the blog posts pages. // $app->get(‘/posts/blogs/{blog}‘, function( Request $request, Response $response) { $newResponse = SetBasicHeader($response); $newResponse->getBody()->write(posts(“blogs”,$request->getAttribute(‘blog’), “index”)); return($newResponse); });
This route returns a list of blog entries and their summaries. The {blog}
variable will be the blog name for which to list entries.
$app->get(‘/posts/blogs/{blog}/{post}‘, function( Request $request, Response $response) { $newResponse = SetBasicHeader($response); $newResponse->getBody()->write(posts(“blogs”,$request->getAttribute(‘blog’), $request->getAttribute(‘post’))); return($newResponse); });
This route gets an individual blog entry. {blog}
is the name of the blog, and {post}
is the blog entry to get.
// // This route handles all the news posts pages. // $app->get(‘/posts/news/{news}‘, function( Request $request, Response $response) { $newResponse = SetBasicHeader($response); $newResponse->getBody()->write(posts(“news”,$request->getAttribute(‘news’), “index”)); return($newResponse); }); $app->get(‘/posts/news/{news}/{post}‘, function( Request $request, Response $response) { $newResponse = SetBasicHeader($response); $newResponse->getBody()->write(posts(“news”,$request->getAttribute(‘news’), $request->getAttribute(‘post’))); return($newResponse); });
The news router requests work just like the blog router requests.
// // This route will process all the pages. Since this should // catch all types of routes other than the home page, this // route should handle the unknown pages as well. // $app->get(‘/{page}‘, function( Request $request, Response $response) { $newResponse = SetBasicHeader($response); $newResponse->getBody()->write(page($request->getAttribute(‘page’))); return($newResponse); });
This is the generic page route. All requests that do not match any of the previous requests will trigger this request.
// // Respond to requests. // $app->run(); ?>
This last bit of code starts the server. This function will do all the processing for the request. Upon returning, the PHP interpreter will end and close the connect to the user’s browser.
This PHP server works completely differently from the other servers in this series. This routine starts and ends for each request, while the other servers keep processing requests. Therefore, this PHP server takes longer to process requests due to loading and unloading of the routines.
Now to set up the server. One of the easiest ways to get an Apache and PHP stack is to use Vagrant. To install on a Mac, use Homebrew with this command:
brew cask install vagrant
If you have a Windows or Linux system, use the installers from the Vagrant website. The website also has a standalone installer for the Mac, but by installing with Homebrew, you can get automatic updates by running:
brew update
Once installed, create a file named Vagrant in the project directory. In this file, place the following code:
Vagrant.configure(“2”) do |config| config.vm.box = “ubuntu/trusty64” config.vm.provision :shell, path: “bootstrap.sh” config.vm.network :forwarded_port, host: 8080, guest: 8080 config.vm.synced_folder “/full/path/to/code/directory”, “/vagrant” end
This is Vagrant’s configuration file. It tells Vagrant what virtual machine box to build upon, the script to run to set up the box for your server, what ports in the virtual machine to map to ports on your main computer, and the folder to sync to the /vagrant folder in the virtual machine. You need to set the full path to the directory on your computer instead of /full/path/to/code/directory
.
Next, create the file bootstrap.sh
and add this script to it:
sudo apt-get update sudo apt-get install -y apache2 # # Setup modules in apache that will be needed. # sudo ln -s /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled/headers.load sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load # # Setup apache on port 8080 and configure apache to read the .htaccess files for # access changes. # sudo cat /etc/apache2/sites-available/000-default.conf | sed ‘s/80/8080/g’ > /var/tmp/sites.conf sudo mv /var/tmp/sites.conf /etc/apache2/sites-available/000-default.conf sudo cat /etc/apache2/ports.conf | sed ‘s/80/8080/g’ > /var/tmp/ports.conf sudo mv /var/tmp/ports.conf /etc/apache2/ports.conf sudo cat /etc/apache2/apache2.conf | sed ‘s/AllowOverride None/AllowOverride All/’ >/var/tmp/apache2.conf sudo mv /var/tmp/apache2.conf /etc/apache2/apache2.conf # # setup php5 # sudo apt-get install -y php5 # # Setup the server root directory # sudo rm -rf /var/www/html sudo ln -fs /vagrant /var/www/html # # reload apache # sudo service apache2 reload
This script will load in the Apache web server and configure it. With Apache configured, it then installs PHP version 5, sets up the root directory for the server, and launches the Apache service. All of this will configure the virtual machine as needed for this project and have the root directory of the server getting files from your project’s directory. Any edits you make in your project directory are instantly available to the server.
In the project directory, create a file named .htaccess and place this code:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [QSA,L] # 1 YEAR <FilesMatch “\.(ico|pdf|flv)$“> Header set Cache-Control “max-age=29030400, public” </FilesMatch> # 1 WEEK <FilesMatch “\.(jpg|jpeg|png|gif|swf)$“> Header set Cache-Control “max-age=604800, public” </FilesMatch> # 2 DAYS <FilesMatch “\.(xml|txt|css|js)$“> Header set Cache-Control “max-age=172800, proxy-revalidate” </FilesMatch> # 1 MIN <FilesMatch “\.(html|htm|php)$“> Header set Cache-Control “max-age=60, private, proxy-revalidate” </FilesMatch>
This tells the Apache server how to handle requests for this site and for automatic caching of requests. The index.php file gets every request to the server.
To start the server, run the following command in the project directory:
vagrant up
This will download the virtual machine if it hasn’t already on your system, run the provisioning script, and launch the server. To view the site, open your browser to http://localhost:8080.
The browser should show the above page. The server is now online and ready for your additions.
If the web site isn’t viewable, you should check the permissions for all the files in the site. OS X often has them set to own readable only. You need to make them world readable with the following command in the project directory:
chmod -R a+r .
That will ensure that the Apache server in the virtual machine is able to read the files.
To stop the server, run the following command in the project directory:
vagrant halt
To learn more about using Vagrant, please read the Vagrant Documentation. You can also check out the many Vagrant tutorials here on Envato Tuts+. I used the tool Hobo for creating my Vagrant files. It is a great tool for configuring, running, and managing Vagrant systems on OS X.
Now that you know how to build a simple yet powerful web server using the PHP language, it’s time for you to experiment. Create new pages, posts, embeddable parts, and shortcodes. This simple platform is far faster than using WordPress, and it is totally in your control.
Unlike the other web servers in this series, this PHP-based CMS can run on any shared hosting account. I am using it for my ministry’s website on DreamHost. I haven’t optimized the pictures any, but it still does fairly well. Tell me about your server in the comments below.
The Best Small Business Web Designs by DesignRush
/Create Modern Vue Apps Using Create-Vue and Vite
/How to Fix the “There Has Been a Critical Error in Your Website” Error in WordPress
How To Fix The “There Has Been A Critical Error in Your Website” Error in WordPress
/How Long Does It Take to Learn JavaScript?
/The Best Way to Deep Copy an Object in JavaScript
/Adding and Removing Elements From Arrays in JavaScript
/Create a JavaScript AJAX Post Request: With and Without jQuery
/5 Real-Life Uses for the JavaScript reduce() Method
/How to Enable or Disable a Button With JavaScript: jQuery vs. Vanilla
/How to Enable or Disable a Button With JavaScript: jQuery vs Vanilla
/Confirm Yes or No With JavaScript
/How to Change the URL in JavaScript: Redirecting
/15+ Best WordPress Twitter Widgets
/27 Best Tab and Accordion Widget Plugins for WordPress (Free & Premium)
/21 Best Tab and Accordion Widget Plugins for WordPress (Free & Premium)
/30 HTML Best Practices for Beginners
/31 Best WordPress Calendar Plugins and Widgets (With 5 Free Plugins)
/25 Ridiculously Impressive HTML5 Canvas Experiments
/How to Implement Email Verification for New Members
/How to Create a Simple Web-Based Chat Application
/30 Popular WordPress User Interface Elements
/Top 18 Best Practices for Writing Super Readable Code
/Best Affiliate WooCommerce Plugins Compared
/18 Best WordPress Star Rating Plugins
/10+ Best WordPress Twitter Widgets
/20+ Best WordPress Booking and Reservation Plugins
/Working With Tables in React: Part Two
/Best CSS Animations and Effects on CodeCanyon
/30 CSS Best Practices for Beginners
/How to Create a Custom WordPress Plugin From Scratch
/10 Best Responsive HTML5 Sliders for Images and Text… and 3 Free Options
/16 Best Tab and Accordion Widget Plugins for WordPress
/18 Best WordPress Membership Plugins and 5 Free Plugins
/25 Best WooCommerce Plugins for Products, Pricing, Payments and More
/10 Best WordPress Twitter Widgets
1 /12 Best Contact Form PHP Scripts for 2020
/20 Popular WordPress User Interface Elements
/10 Best WordPress Star Rating Plugins
/12 Best CSS Animations on CodeCanyon
/12 Best WordPress Booking and Reservation Plugins
/12 Elegant CSS Pricing Tables for Your Latest Web Project
/24 Best WordPress Form Plugins for 2020
/14 Best PHP Event Calendar and Booking Scripts
/Create a Blog for Each Category or Department in Your WooCommerce Store
/8 Best WordPress Booking and Reservation Plugins
/Best Exit Popups for WordPress Compared
/Best Exit Popups for WordPress Compared
/11 Best Tab & Accordion WordPress Widgets & Plugins
/12 Best Tab & Accordion WordPress Widgets & Plugins
1New Course: Practical React Fundamentals
/Preview Our New Course on Angular Material
/Build Your Own CAPTCHA and Contact Form in PHP
/Object-Oriented PHP With Classes and Objects
/Best Practices for ARIA Implementation
/Accessible Apps: Barriers to Access and Getting Started With Accessibility
/Dramatically Speed Up Your React Front-End App Using Lazy Loading
/15 Best Modern JavaScript Admin Templates for React, Angular, and Vue.js
/15 Best Modern JavaScript Admin Templates for React, Angular and Vue.js
/19 Best JavaScript Admin Templates for React, Angular, and Vue.js
/New Course: Build an App With JavaScript and the MEAN Stack
/Hands-on With ARIA: Accessibility Recipes for Web Apps
/10 Best WordPress Facebook Widgets
13 /Hands-on With ARIA: Accessibility for eCommerce
/New eBooks Available for Subscribers
/Hands-on With ARIA: Homepage Elements and Standard Navigation
/Site Accessibility: Getting Started With ARIA
/How Secure Are Your JavaScript Open-Source Dependencies?
/New Course: Secure Your WordPress Site With SSL
/Testing Components in React Using Jest and Enzyme
/Testing Components in React Using Jest: The Basics
/15 Best PHP Event Calendar and Booking Scripts
/Create Interactive Gradient Animations Using Granim.js
/How to Build Complex, Large-Scale Vue.js Apps With Vuex
1 /Examples of Dependency Injection in PHP With Symfony Components
/Set Up Routing in PHP Applications Using the Symfony Routing Component
1 /A Beginner’s Guide to Regular Expressions in JavaScript
/Introduction to Popmotion: Custom Animation Scrubber
/Introduction to Popmotion: Pointers and Physics
/New Course: Connect to a Database With Laravel’s Eloquent ORM
/How to Create a Custom Settings Panel in WooCommerce
/Building the DOM faster: speculative parsing, async, defer and preload
1 /20 Useful PHP Scripts Available on CodeCanyon
3 /How to Find and Fix Poor Page Load Times With Raygun
/Introduction to the Stimulus Framework
/Single-Page React Applications With the React-Router and React-Transition-Group Modules
12 Best Contact Form PHP Scripts
1 /Getting Started With the Mojs Animation Library: The ShapeSwirl and Stagger Modules
/Getting Started With the Mojs Animation Library: The Shape Module
Getting Started With the Mojs Animation Library: The HTML Module
/Project Management Considerations for Your WordPress Project
/8 Things That Make Jest the Best React Testing Framework
/Creating an Image Editor Using CamanJS: Layers, Blend Modes, and Events
/New Short Course: Code a Front-End App With GraphQL and React
/Creating an Image Editor Using CamanJS: Applying Basic Filters
/Creating an Image Editor Using CamanJS: Creating Custom Filters and Blend Modes
/Modern Web Scraping With BeautifulSoup and Selenium
/Challenge: Create a To-Do List in React
1Deploy PHP Web Applications Using Laravel Forge
/Getting Started With the Mojs Animation Library: The Burst Module
/10 Things Men Can Do to Support Women in Tech
/A Gentle Introduction to Higher-Order Components in React: Best Practices
/Challenge: Build a React Component
/A Gentle Introduction to HOC in React: Learn by Example
/A Gentle Introduction to Higher-Order Components in React
/Creating Pretty Popup Messages Using SweetAlert2
/Creating Stylish and Responsive Progress Bars Using ProgressBar.js
/18 Best Contact Form PHP Scripts for 2022
/How to Make a Real-Time Sports Application Using Node.js
/Creating a Blogging App Using Angular & MongoDB: Delete Post
/Set Up an OAuth2 Server Using Passport in Laravel
/Creating a Blogging App Using Angular & MongoDB: Edit Post
/Creating a Blogging App Using Angular & MongoDB: Add Post
/Introduction to Mocking in Python
/Creating a Blogging App Using Angular & MongoDB: Show Post
/Creating a Blogging App Using Angular & MongoDB: Home
/Creating a Blogging App Using Angular & MongoDB: Login
/Creating Your First Angular App: Implement Routing
/Persisted WordPress Admin Notices: Part 4
/Creating Your First Angular App: Components, Part 2
/Persisted WordPress Admin Notices: Part 3
/Creating Your First Angular App: Components, Part 1
/How Laravel Broadcasting Works
/Persisted WordPress Admin Notices: Part 2
/Create Your First Angular App: Storing and Accessing Data
/Persisted WordPress Admin Notices: Part 1
/Error and Performance Monitoring for Web & Mobile Apps Using Raygun
/Using Luxon for Date and Time in JavaScript
7 /How to Create an Audio Oscillator With the Web Audio API
/How to Cache Using Redis in Django Applications
/20 Essential WordPress Utilities to Manage Your Site
/Introduction to API Calls With React and Axios
/Beginner’s Guide to Angular 4: HTTP
/Rapid Web Deployment for Laravel With GitHub, Linode, and RunCloud.io
/Beginners Guide to Angular 4: Routing
/Beginner’s Guide to Angular 4: Services
/Beginner’s Guide to Angular 4: Components
/Creating a Drop-Down Menu for Mobile Pages
/Introduction to Forms in Angular 4: Writing Custom Form Validators
/10 Best WordPress Booking & Reservation Plugins
/Getting Started With Redux: Connecting Redux With React
/Getting Started With Redux: Learn by Example
/Getting Started With Redux: Why Redux?
/How to Auto Update WordPress Salts
/How to Download Files in Python
/Eloquent Mutators and Accessors in Laravel
1 /10 Best HTML5 Sliders for Images and Text
/Site Authentication in Node.js: User Signup
/Creating a Task Manager App Using Ionic: Part 2
/Creating a Task Manager App Using Ionic: Part 1
/Introduction to Forms in Angular 4: Reactive Forms
/Introduction to Forms in Angular 4: Template-Driven Forms
/24 Essential WordPress Utilities to Manage Your Site
/25 Essential WordPress Utilities to Manage Your Site
/Get Rid of Bugs Quickly Using BugReplay
1 /Manipulating HTML5 Canvas Using Konva: Part 1, Getting Started
/10 Must-See Easy Digital Downloads Extensions for Your WordPress Site
22 Best WordPress Booking and Reservation Plugins
/Understanding ExpressJS Routing
/15 Best WordPress Star Rating Plugins
/Creating Your First Angular App: Basics
/Inheritance and Extending Objects With JavaScript
/Introduction to the CSS Grid Layout With Examples
1Performant Animations Using KUTE.js: Part 5, Easing Functions and Attributes
Performant Animations Using KUTE.js: Part 4, Animating Text
/Performant Animations Using KUTE.js: Part 3, Animating SVG
/New Course: Code a Quiz App With Vue.js
/Performant Animations Using KUTE.js: Part 2, Animating CSS Properties
Performant Animations Using KUTE.js: Part 1, Getting Started
/10 Best Responsive HTML5 Sliders for Images and Text (Plus 3 Free Options)
/Single-Page Applications With ngRoute and ngAnimate in AngularJS
/Deferring Tasks in Laravel Using Queues
/Site Authentication in Node.js: User Signup and Login
/Working With Tables in React, Part Two
/Working With Tables in React, Part One
/How to Set Up a Scalable, E-Commerce-Ready WordPress Site Using ClusterCS
/New Course on WordPress Conditional Tags
/TypeScript for Beginners, Part 5: Generics
/Building With Vue.js 2 and Firebase
6 /Best Unique Bootstrap JavaScript Plugins
/Essential JavaScript Libraries and Frameworks You Should Know About
/Vue.js Crash Course: Create a Simple Blog Using Vue.js
/Build a React App With a Laravel RESTful Back End: Part 1, Laravel 5.5 API
/API Authentication With Node.js
/Beginner’s Guide to Angular: Routing
/Beginners Guide to Angular: Routing
/Beginner’s Guide to Angular: Services
/Beginner’s Guide to Angular: Components
/How to Create a Custom Authentication Guard in Laravel
/Learn Computer Science With JavaScript: Part 3, Loops
/Build Web Applications Using Node.js
/Learn Computer Science With JavaScript: Part 4, Functions
/Learn Computer Science With JavaScript: Part 2, Conditionals
/Create Interactive Charts Using Plotly.js, Part 5: Pie and Gauge Charts
/Create Interactive Charts Using Plotly.js, Part 4: Bubble and Dot Charts
Create Interactive Charts Using Plotly.js, Part 3: Bar Charts
/Awesome JavaScript Libraries and Frameworks You Should Know About
/Create Interactive Charts Using Plotly.js, Part 2: Line Charts
/Bulk Import a CSV File Into MongoDB Using Mongoose With Node.js
/Build a To-Do API With Node, Express, and MongoDB
/Getting Started With End-to-End Testing in Angular Using Protractor
/TypeScript for Beginners, Part 4: Classes
/Object-Oriented Programming With JavaScript
/10 Best Affiliate WooCommerce Plugins Compared
/Stateful vs. Stateless Functional Components in React
/Make Your JavaScript Code Robust With Flow
/Build a To-Do API With Node and Restify
/Testing Components in Angular Using Jasmine: Part 2, Services
/Testing Components in Angular Using Jasmine: Part 1
/Creating a Blogging App Using React, Part 6: Tags
/React Crash Course for Beginners, Part 3
/React Crash Course for Beginners, Part 2
/React Crash Course for Beginners, Part 1
/Set Up a React Environment, Part 4
1 /Set Up a React Environment, Part 3
/New Course: Get Started With Phoenix
/Set Up a React Environment, Part 2
/Set Up a React Environment, Part 1
/Command Line Basics and Useful Tricks With the Terminal
/How to Create a Real-Time Feed Using Phoenix and React
/Build a React App With a Laravel Back End: Part 2, React
/Build a React App With a Laravel RESTful Back End: Part 1, Laravel 9 API
/Creating a Blogging App Using React, Part 5: Profile Page
/Pagination in CodeIgniter: The Complete Guide
/JavaScript-Based Animations Using Anime.js, Part 4: Callbacks, Easings, and SVG
/JavaScript-Based Animations Using Anime.js, Part 3: Values, Timeline, and Playback
/Learn to Code With JavaScript: Part 1, The Basics
/10 Elegant CSS Pricing Tables for Your Latest Web Project
/Getting Started With the Flux Architecture in React
/Getting Started With Matter.js: The Composites and Composite Modules
Getting Started With Matter.js: The Engine and World Modules
/10 More Popular HTML5 Projects for You to Use and Study
/Understand the Basics of Laravel Middleware
/Iterating Fast With Django & Heroku
/Creating a Blogging App Using React, Part 4: Update & Delete Posts
/Creating a jQuery Plugin for Long Shadow Design
/How to Register & Use Laravel Service Providers
2 /Unit Testing in React: Shallow vs. Static Testing
/Creating a Blogging App Using React, Part 3: Add & Display Post
/Creating a Blogging App Using React, Part 2: User Sign-Up
20 /Creating a Blogging App Using React, Part 1: User Sign-In
/Creating a Grocery List Manager Using Angular, Part 2: Managing Items
/9 Elegant CSS Pricing Tables for Your Latest Web Project
/Dynamic Page Templates in WordPress, Part 3
/Angular vs. React: 7 Key Features Compared
/Creating a Grocery List Manager Using Angular, Part 1: Add & Display Items
New eBooks Available for Subscribers in June 2017
/Create Interactive Charts Using Plotly.js, Part 1: Getting Started
/The 5 Best IDEs for WordPress Development (And Why)
/33 Popular WordPress User Interface Elements
/New Course: How to Hack Your Own App
/How to Install Yii on Windows or a Mac
/What Is a JavaScript Operator?
/How to Register and Use Laravel Service Providers
/
waly Good blog post. I absolutely love this…