Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
How to Set up an Online Multi-Language Magazine with Sulu
Jun 12, 2017 @ 12:17:01

The SitePoint PHP blog has a new tutorial posted by editor Bruno Skvorc showing you how to set up an online multi-language magazine with the help of the Sulu CMS. This article is a follow up to their previous "Getting Started" tutorial helping you get Sulu up and running.

We previously demonstrated the proper way to get started with Sulu CMS by setting up a Hello World installation on a Vagrant machine. Simple stuff, but can be tricky.

[...] This time we’ll look into basic Sulu terminology, explain how content is formed, created, stored, and cached, and look into building a simple online magazine with different locales (languages).

The tutorial then covers pages and page templates including what the Twig markup looks like, how to work with them in the UI and the end result of their sample "Hello world" page. There's a brief section about caching before he moves into the main part of the tutorial: the creation of the magazine. He covers the use of Jackalope, ElasticSearch and the ArticleBundle and how to get them up, running and playing nicely together. The article wraps up with a look at locales and how they work in the Sulu setup.

tagged: tutorial online multilanguage locale language magazine sulu cms

Link: https://www.sitepoint.com/set-online-multi-language-magazine-sulu/

Symfony Finland:
PHP 7.1 vs. 7.0 performance benchmarks with Symfony
Dec 12, 2016 @ 10:04:09

On the Symfony Finland site they've post together a post sharing some benchmark results of Symfony on PHP 7.0 versus 7.1, the most recent major release of the PHP language with some improvements of its own.

PHP 7.1 was launched on December 1st 2016. This was the first minor release after the release of 7.0 a year ago. PHP 7.0 was a revolutionary product, especially when it comes to memory usage and performance. PHP 7.1 is a more modest upgrade that brings new features and improved performance. But how much has performance improved from a year back?

The benchmarking uses the eZ Platform demo running a full CMS similar to the previous benchmarking done in 2015. The checks were run using:

  • a "clean" environment (no caching, PHP-FPM just restarted and no APC cache)
  • standard requests running in development mode
  • more requests but this time in production mode

The post shares the results with a few graphs showing them in terms of response time for both sequential and concurrent page requests.

tagged: php70 php71 benchmark symfony ezplatform cms results

Link: https://www.symfony.fi/entry/php-7-1-vs-7-0-benchmarks-symfony

Building a CMS: phpPress
Aug 17, 2016 @ 10:20:38

On the TutsPlus.com site there's a new tutorial posted walking you through the [creation of a flat file CMS] in PHP. It's a simple Slim framework based application that allows the creation of basic pages with a header, footer and sidebar (as well as handling 404s and errors).

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.

He starts by helping you get the necessary libraries installed via Composer including the parsedown, lightcandy and Slim framework packages. From there it's into the code making:

  • the front controller to define routes and set up an error handler
  • defining the different templates (header, footer, etc)
  • definition of "shortcodes"
  • handling page processing (rendering the content into output)

The tutorial finishes off with the details on getting the server up and running: creating a Vagrant instance with Apache and PHP 5 installed and working together and serving code from a shared folder.

tagged: contentmanagementsystem cms flatfile tutorial phppress composer package

Link: http://code.tutsplus.com/tutorials/building-a-cms-phppress--cms-26536

SitePoint PHP Blog:
6 More Must-Do Grav Tweaks: Ready for Hacker News Traffic!
Aug 09, 2016 @ 11:18:52

On the SitePoint PHP blog author Bruno Skvorc continues his series about using the Grav flat-file CMS to create fast, simple sites. In his previous post he talked about the use of various "must have plugins". In this latest post he focuses more on some "tweaks" you can make to prepare your site for higher load.

We previously looked at some essential Grav plugins with which to round off the installation of a personal blog. In this post, we’ll take a look at some additional, advanced plugins, rounding it all off with an installation of Varnish for supercaching, taking performance to a whole new level.

His list of "tweaks" (and other plugins) that are recommended for a more robust site are:

  • The "Related Pages" plugin
  • An "assets" plugin for custom JS and CSS without extending the theme
  • Simple search handling
  • Comments on the content with the JsComments plugin
  • Image Optimization and CDNs
  • Caching with Varnish

All but the last item on the list are plugins you can drop in and configure pretty easily. Varnish requires a little extra setup, however, as it's an external service/software that needs to be running in front of your web server to do its job.

tagged: grav tweaks top6 plugin heavy load tutorial cms flatfile

Link: https://www.sitepoint.com/6-more-must-do-grav-tweaks-ready-for-hacker-news-traffic/

SitePoint Web Blog:
Please: Automated CMS and Framework Installs in Vagrant
May 25, 2016 @ 10:29:08

On the SitePoint.com site's "Web" category they're posted a tutorial showing off an interesting piece of software that helps make automated installs of CMS/frameworks easy: a simple bash script tool called Please.

If you’re a web developer, possibly one of your most boring and repetitive tasks is the configuration of the basic setup for every new project. Configuring your my-project.dev domain, creating the database, installing WordPress (or any other CMS/Framework) for the thousandth time: you already know how to do it. What if you could automate all of that?

Well, actually, you can. Please is a simple bash script that helps to automate the installations of many CMSs and Frameworks by configuring them automatically into your Vagrant box, adding a development domain name into your host file, and even a database if needed.

They start off by helping you get a Vagrant box up and running to use for the Please handling. You then clone the Please repository locally and can use the command line tool to set up the process for multiple CMS/framework types including WordPress, Laravel and React. There's also a section covering the creation of your own environment if you need something more custom. Please is currently in beta at the time of this post so be aware that there may still be issues that need resolving before it becomes stable.

tagged: please automated installation tool commandline cms framework vagrant

Link: https://www.sitepoint.com/please-automated-cms-and-framework-installs-in-vagrant/

Symfony Finland:
Learn Symfony and modern PHP with Bolt 3.0 - a Silex powered CMS
May 11, 2016 @ 09:36:53

On the Symfony Finland site there's a new article posted about the recently released v3.0 of the Bolt CMS and details about this Silex-powered, modern PHP-based system.

On Tuesday 10th of May the development team released a new major version of Bolt CMS. The Open Source content management system is a lightweight and easy to use tool for managing websites and blogs. In addition it's perfect for learning modern PHP development practises.

The third major version of Bolt continues on the path, being an evolution rather than a revolution. The CMS is built on the Silex microframework based on the Symfony PHP components.

The article talks about the "solid foundation" of Silex and good project management skills of the team behind it. They then get into the installation of the tool and some of the libraries that it uses to get the job done (including Twig and YAML handling). They also list some of the things that are new in the v3.0 of the CMS including:

  • A new extensible Storage layer
  • Backend UI refresh
  • Improved tests / code coverage
  • New documentation
  • Web asset queues, and easier to keep files out of webroot

There's also mention of some of the things that were removed and didn't make the cut to be included in the release. The post ends with links to other resources where you can find out about Bolt, get its source and a few other articles about people putting it to use.

tagged: bold cms silex symfony modern release v3 overview installation

Link: https://www.symfony.fi/entry/learn-symfony-and-modern-php-with-bolt-3-0-a-silex-powered-cms

SitePoint PHP Blog:
First Look at Pagekit CMS – Clean, Extensible, Fast, But…
Apr 26, 2016 @ 10:55:55

On the SitePoint PHP blog there's a post from Bruno Skvorc introducing the Pagekit CMS, a content management system that's "clean, extensible and fast" (but it does come with some caveats).

Pagekit hit version 1 recently, and as I’d been looking at personal blogging engines, I thought it’d only be fair to check it out. Granted, blogging is merely a subset of the functionality Pagekit can offer, but a good basic test-drive subset nonetheless.

He walks you through the installation and configuration of a new Pagekit-based site using their own installer script (after downloading it from their site). He then goes through some of the basic features of the CMS including native Markdown support, how the editor looks and how the results render. He includes a guide on setting up a blog too using a "blog" plugin and an extension to add in better syntax highlighting. He also looks at other features of the CMS including custom layouts and "pretty" URL support. He points out some security changes you'll want to make out of the box to protect sensitive files and briefly touches on deploying the site to production and links to their own guide for additional help.

tagged: pagekit cms content management introduction tutorial project

Link: http://www.sitepoint.com/first-look-at-pagekit-cms-clean-extensible-fast-but/

Statamic v2 Beta: First Impressions of a new Laravel-based flat-file CMS
Feb 01, 2016 @ 13:37:14

On the Tighten.co blog they've posted their own review of Statamic, the flat-file based content management system with a Laravel backend. Statamic is a project that hopes to provide easy content management, responsive layouts and plenty of features to make an easy-to-use and robust CMS.

Among the developers I know who used to use ExpressionEngine but have since left, most work in Craft and/or Laravel. I kept hearing folks mention Statamic, but all I knew about it was that it was flat file, which wasn't particularly compelling to me.

Fast forward two years, and they've re-written the entire application to run on Laravel (now released as v2 beta). [...] Their documentation is hilarious, the community is welcoming and helpful, and the code—granted, I'm only a few weeks in—seems super easy to work with. So, what's the deal? Why have we set up Tighten's blog on Statamic?

The post then goes on to talk about the "quest" for a good Laravel-based content management system. They also talk about some of the essentials they see a CMS needing to be effective: good user interaction (UI/UX), how much and how difficult it is to customize and how it is configured. For each point they talk about how Statamic does things and their own verdict on the software and how good it does at filling these requirements.

tagged: statamic beta laravel content management system cms flatfile

Link: http://blog.tighten.co/statamic-v2-beta-first-impressions-of-a-new-laravel-based-flat-file-cms

Symfony Finland:
What's on the Menu, Symfony?
Jan 28, 2016 @ 11:49:13

On the Symfony Finland site they've posted a tutorial about Symfony and menus, making use of the KnpMenuBundle to create flexible and easily configured menus with their own renderers.

Menus are a vital part of any web application or a website. Content Management Systems are traditionally a strong contender in this field as they are at their core just tools to create navigatable views to a pool of content. The Symfony Framework on the other hand is neutral when it comes to menus.

[...] There are a number of options for building menus in PHP, but the de-facto standard method for Symfony Framework is the KnpMenuBundle. It uses the KnpMenu library which is an object oriented PHP library for constructing and rendering menus.

The tutorial provides a simple example of using the bundle to create a menu with a handful of options and rendering it with a simple (included) ListRenderer. There's also an example of using a YAML configuration to create the menu and some example code of using a bit more complex and dynamic menu. They also talk a bit about content management systems, their use of menus and which they see as providing a better user experience than the others.

tagged: menu tutorial knpmenubundle symfony cms knplabs

Link: https://www.symfony.fi/entry/whats-on-the-menu-symfony

Andrew Embler:
Q&A: Using Composer in a concrete5 Package
Aug 21, 2015 @ 11:30:46

Andrew Embler has posted a guide to his site showing you how to use Composer with concrete5 to integrate third party libraries quickly and easily. concrete5 is an open source content management system under the MIT license and is flexible and easy to extend.

Let's say I'm creating a statistics package and I want to use LavaCharts in it. For those who don't know, LavaCharts is a PHP library that abstracts Google's JavaScript Chart API to PHP. Instead of writing JavaScript, you build your charts with object-oriented PHP. It's nice. LavaCharts is available through Composer, so I'll include it that way.

He uses this particular package as an example, showing you how to create the composer.json file to include the LavaCharts library and run Composer to install it. He then shows the integration of the package with the concrete5 CMS instance, including the Composer autoloader in the "on start" handling. From there it's just a matter of referencing the library via its namespace and using it to populate and generate the resulting chart.

tagged: composer lavacharts tutorial integration library package concrete5 cms

Link: http://andrewembler.com/2015/08/q-using-composer-concrete5-package/