How I switched to Lando to develop using Docker!

A few months ago I tested Docker to manage my development environments. The major advantage of Docker is to be able to develop locally on the same technical basis of the server. Admit that it’s tempting when you have sites hosted by different providers (even if most of them for my case are at O2Switch ) with different software versions of PHP, Mysql, Mariadb. The major drawback of Docker, in my humble opinion, is the complexity of configuration! I had never managed to run several vhosts at the same time!

With Lando, it’s easy!

While chatting with a colleague on the French WordPress Slack, I discovered Lando.

To use Lando, you first need to install Docker, then Lando comes as an overlay. It will greatly facilitate the configuration of the different Docker images to use to run your environment.

WordPress Recipes!

Lando offers “Recipes”, literally recipes for the main CMS and Frameworks on the market, including WordPress.

With the WordPress recipe, Lando will create an environment including PHP, and Mariadb to run your site but also wp-cli!

In short, in a few seconds of launching, you are ready to develop on your favorite CMS.

A simplified configuration for Docker!

Here is an example of the .lando.yml configuration file that you will need to have at the root of your project to launch your Lando instance!

name: test
recipe: wordpress
config:
  webroot: .
  php: '7.0'
  xdebug: true
  database: mariadb
services:
  pma:
    type: phpmyadmin
    hosts:
      - database
      - old-test
  mailhog:
    type: mailhog
    hogfrom:
    - appserver
  old-test:
    type: mariadb
    portforward: true
    creds:
      user: wordpress
      password: wordpress
      database: old-test
tooling:
  compose:
    service: appserver

This is a simple text file in .yml format that will be read by Lando to create your environment.

Note a “name”, this one will be used to create your local development url! as well as the services you want to create and in which version! Here I chose a PHP version 7.0, Mariadb in its current stable version, Phpmyadmin, Mailhog to “catch the mails” without having a mail server to configure. There is also the configuration of a second ‘old-test’ database server, the activation of Xdebug and Composer! Lando on Github

Multisite in WordPress: Why? How do I do it?

In this tutorial, I’ll explain what a WordPress multi-site is, why set it up and most importantly how!

What is a multi-site?

Most of you might be familiar with “classic” WordPress, or “single” WordPress as it is also called. It is an installation of our CMS that will be used to proudly power a website.

By enabling the “Multi-site” feature, your “classic” WordPress with a single installation will be able to power as many websites as your server can handle!

The best example in this area is wordpress. com, the website platform created and managed by Automaticc. This commercial service that powers several million websites is in fact a single installation of WordPress!

Since WordPress 3.0, multi-site functionality is fully integrated into WordPress.

When to use a site network?

It can be interesting to create a site network when you are going to have several sites to host… you will then manage only one installation sharing themes and extensions. You will save time in maintenance since you will update for example only one WordPress core, one extension or theme version.

Different uses

Multi-site is also sometimes used to create a multilingual site. You can assign a language to each site and write different content for each site.

The networked sites can also be used to create a site by site company, a holding and its subsidiaries for example.

How do I set up a multi-site with WordPress?

There are 2 ways to create a site network:

  • In sub-domain: your url will be in the form site1.example.com, site2.example.com
  • In sub-folder: your url will be like exmple.com/site1, example.com/site2

If you install your network on a new installation, you will have the choice between these 2 structures. If you are converting an existing WordPress installation, you will have no choice but to choose the sub-folder installation.

Note that there is nothing you can’t do with one installation that you can do with the other!

Creating the network

First of all, for this example, I’m going to start with a local installation of WordPress.

Of course, it is highly recommended to make a full backup (files + database) at this level.

If you follow the WordPress developer’s bible, I named the Codex, you will understand that you have to create a PHP constant in the WordPress configuration file located at the root of your installation.

/* Multisite */
define('WP_ALLOW_MULTISITE', true);
/* That's all, don't touch the following! */

The purpose of this constant is to tell WordPress that we allow it to create a Multisite:

WordPress

Let’s click on the new entry in the “Tools” menu named “Network Creation”. You will get this page:

Capture d'écran

It is at this step that you can choose the structure of your URLs. Either in subdomain or in subfolder. If you want to choose the URL in sub-domain, you will have to create a wildcard entry in your DNS records.
In my example above, to get site1.tuto-multisite.local you will have to create a wildcard in DNS with the asterisk character (*) : *.tuto-multisite.local and point it to the folder containing your WordPress installation.

Click on “Install”

Capture d'écran

Ok so there I have an error message because I requested a subdomain installation of my WordPress network and I didn’t create a wildcard domain as requested. This is because on my local installation… it’s not easy!
WordPress tried to create the random sub-domain 14b292.tuto-multisite.local on the fly and failed. If you are installing locally, you can create the domain by editing your “Hosts” file.

The installation is almost finished, you just have to copy the 2 blocks of code in the .htaccess and the wp-config.php of your installation. Replace the content of your .htaccess with the block above.

It’s done? Click on the “Connect” link

Congratulations! Your WordPress site network is installed!

Let’s discover the new Back-Office of our newly installed multi-site WordPress.

Logo

The main change, as you may have noticed, is the appearance of a new menu, the network administration menu:

Here will be listed all the sites you can create on your site network as a Super-admin. Indeed, by activating the multi-site mode, a new role has been created, that of “Super-Admin”.

What is the “Super Admin”?

On a typical WordPress installation, we have the roles of “Subscriber”, “Contributor”, “Author”, “Editor” and “Admin”. The Administrator is the highest role, the one with the most rights on your installation. It is the user with this role who will be able to add, activate, delete an extension or a theme. He will also be able to completely configure your installation.

On a multisite installation, the installation of extensions and themes is done at the network administration level and not at the level of each site. So a new role was needed to manage this new level of administration.

If we summarize, an administrator will be able to manage his site while the super-administrator will be able to manage all the sites of the network as well as to install themes and extensions which will be available on all the network.

General principles of operation

Now your Multisite is installed but I won’t leave you like that!

Know that an extension like a theme is installed as a Super-admin on the network admin dashboard.

Know that an extension activated at the network level will be available on all the sites of your Multi-site BUT you can activate an extension site by site, or each site administrator can activate an extension on his site.

For themes, it works a little bit different, it must be active on the network to be activated on each site. So, if you have a theme and its child, you can activate only the child theme so that no changes are made to the “parent” theme.

One WordPress for several sites? Why not switch to domain mapping?

Setting up a multi-site – multi-domain WordPress at O2Switch

Easily post your Facebook page feed.

I had a simple need these last few days… to display the feed of a Facebook page on a client site. Of course, I looked at the existing extensions and… I must admit that there are a ton of them!

A ton is good… but nothing really corresponded to my needs, because it was too complex to set up, required a Facebook account to create an application. In short, what I needed was simply what Facebook offers on its “plugin page”.

So of course… I could have coded my thing in my corner… and I said to myself… if I have the need, then surely others too… so make an extension my brave Séb !

A new extension by thivinfo.com

It is a very simple extension, there is a shortcode and a block for the new editor (thanks to Marie Comet).
The shortcode [\simple_wall] waits for at least one slug
parameter which waits for the slug of your Facebook page…

Example : the short code [\simple_wall slug="MotoGP"] (without the slash which has been added so that WP doesn’t interpret it) should display the feed of the Facebook page dedicated to this sport of which we are world champion (how do I get away from that ?).

Here it is in action:
[simple_wall slug=’MotoGP’]

The Gutenberg block “Simple Wall” is available in the list of blocks and also waits for the slug of the page to display.

The 2 other optional parameters are the width and the height of display.

The planned evolutions…

I use Twitter more (which is quite simple since I don’t have a FB account) and I wonder if I could evolve the extension to display the Twitter feed as well… tell me in comments if you’re interested.

Save Private Mozilla

Today, I take the keyboard to talk to you about anything other than WordPress. Mozilla, the entity that develops the excellent web browser Firefox has announced to remove another 1/4 of its staff.

Job cuts are not the main problem…

Behind Mozilla’s announcement hides something much more serious in my opinion … since the disappearance of Firefox would lead to an influx to its competitor Google Chrome and would give even more weight to this giant that has made monopoly its hobbyhorse.

Yeah, but I like Google Chrome!

Yes and nobody prevents you from using it but in order to keep a semblance of freedom in this world, it would be nice to use Mozilla Firefox too in order to make it take market share and give faith to its developers.

The goal is not to see Firefox with a 90% market share as Nicolas Hoffman explains very well in his tweet :

The goal is to keep the choice to use Firefox, Chrome, Edge or any other web browser so that none of them have a monopoly and dictate its rules and deprive us of our freedom of choice and incidentally resell our personal data.

Kawi: The WordPress Theme you will love

Today, I’m going to introduce you a slightly different article as I’m going to introduce you a theme…

Hey! what’s your theme?

The theme I wanted to talk to you about is none other than the one you see on thivinfo.com: Kawi by Vincent Dubroeucq

Why Kawi?

It’s quite simple, I’m not a front-end developer, I didn’t want to develop a theme from A to Z knowing that colleagues from the French WordPress community had already developed some good ones…

My friend Marie Comet simply made me discover Vincent’s theme by telling me:

  • It’s light
  • respectful of WordPress development best practices and accessibility (a11y)
  • easy to customize

Bingo! I will use it!

Child theme VS starter theme?

I asked myself: are you going to use it as a starter theme or more classically by creating a child theme?

In addition to the official WordPress theme directory version, Vincent also offers his theme on Github. The advantage of this version is that it offers the SASS sources that composes the stylesheet. It is therefore a more oriented version for developers who would like to use it as a working base…

Ok, but do I want to cut myself off from the improvements that Vincent could bring to his theme? not really, so I opted to create a child theme to keep the possible future evolutions of the theme.

The version you see here is the child version of the theme available for free on the WordPress directory.

Why changing theme?

And why not?!

First of all because the previous one based on the Humescores theme by Morten Rand-Hendriksen had grown over the years. After 4 years or so, through tests, graphic and functional modifications… the theme had become heavy to manage and to load.

And then the desire to change a little too!

What changes were made?

Not a lot because as a great artist in front of the eternal, I took almost the same style and layout of the home page!

The difference is rather under the hood because the CSS of my child theme is created thanks to SASS which allowed me to discover the excellent Prepros tools avoiding me an installation of an additional tool like Gulp and its multiple dependencies never up to date when I want to use it.

Results

The result is a faster website, more accessible to people with disabilities or using adapted equipment. For me, it’s a lighter theme to maintain and ready to evolve according to my future ideas…

3, 2, 1 Translate!

On April 17, 2020 a WordCamp should have taken place in Paris. Given the situation due to Covid19, this one as well as many others was cancelled.

The idea of organizing a day of virtual meeting has born in the minds of several members of the French WordPress community!

We are therefore organizing an half day of contribution to the WordPress project open to everybody, whether you are already a contributor or a novice.

Participate

It’s easy to participate, sign up for the Zoom videoconference. The coordination will also be done via the Slack of the French-speaking community and more specifically on the channel #wptranslationday, to get an invitation, it’s this way

Read the official announcement

See you next Friday!

Thivinfo présente un nouveau service: paroisse-catholique.fr

Aujourd’hui, je souhaite partager un nouveau projet qui pourra rendre de nombreux services je l’espère à certains d’entre vous.

Il était une fois 5p2p

J’ai travaillé un peu plus de 2 ans pour l’association 5 Pains et 2 Poissons qui avait pour but de faciliter le numérique auprès des associations ecclésiastiques.

En tant que développeur WordPress, je produisais des sites web pour des institutions et congrégations religieuses. Cette expérience m’a permis de découvrir un monde qui a besoin de communiquer et de façon efficace… mais qui n’en a pas les moyens.

WordPress au service de l’Église Catholique!

A la fin de cette expérience, l’idée m’est venu de créer un service permettant aux paroisses n’ayant pas trop de revenu d’accéder à un service web de qualité répondant aux standards du web d’aujourd’hui.

Et c’est ainsi qu’est né paroisse-catholique.fr !

Que propose Paroisse-catholique.fr?

Paroisse-catholique.fr propose une solution clé en main qui vous permettra de créer vous même sans connaissance technique le site qui ressemble à votre paroisse.

  • Publiez facilement de l’actualité a destination de vos paroissiens
  • Programmez vos évènements paroissiaux et locaux
  • libérez vous des contraintes, ne gérez que la communication de votre paroisses facilement.
  • Permettez a vos paroissiens de vous contacter facilement
  • Mettez facilement en place des campagnes de dons (denier du culte, donations…)

Quels sont les domaines disponible?

Pour le moment vous pourrez obtenir dans le cadre de votre abonnement un sous-domaine de l’un des domaines suivant:

  • paroisse-catholique.fr
  • paroisse-catholique.org
  • paroisse-catholique.net
  • paroisse-catholique.info
  • paroissial.fr
  • ma-paroisse.org
  • ma-paroisse.fr
  • votre domaine personnalisé…

WP Grid Builder to easily create a faceted search system with WordPress

Today I am going to present you a French solution to create a faceted search system!

What is a faceted search?

A faceted search is a technique for narrowing the results as search criteria are selected.

But if you know, you come up on a page with 200 T-shirts. You select your size, there are 128 choices, then the color, there are 50 possibilities, then the price and you get the only model you can afford!

Until not so long ago, you had to use the FacetWP extension on WordPress but recently, a new extension developed in the south of France has appeared: WP Grid Builder.

If FacetWP is limited to offer a developer-oriented tool to create facets, WP Grid Builder is a consumer-oriented tool and does not only offer facets.

Facets and content grids

Indeed, it also offers the display of grids and templates, all easily manageable in the backoffice of your WordPress.
So non-developers will be able to create a page with a faceted search box and display the results as a grid without a line of code.

WP Grid Builder for developers.

You are a developer then benefit from all the power of WP Grid Builder by creating your facets and templates directly in your projects.

WP Grid Builder has been thought so that WordPress web site developers can easily realize all kinds of projects. So they will find PHP and JS functions and hooks.

Of course, a detailed documentation of the functions is available on its website

WP Grid Builder for non-developers.

Aren’t you developers?

Nothing serious, Loïc thought of everything. You will be able to create your facets, grids and maps directly in the back-office and display your creations via short codes or Gutenberg blocks for the new editor.

Hello, Doctor? I’ve got a problem!

Who has never been in front of his website or that of an equipped customer does not do what we want”? That’s when the support of paid extensions comes into play… and with WP Grid Builder, as a French speaking person we are spoiled since Loïc lives in the south of France.

So he answers in French on our time zone… which brings a reactivity that is always appreciated!

Nothing beats examples!

As they say: A picture is worth 1000 words. I just replaced FacetWP on Thivinfo.com by WP Grid Builder.

Check out the result:

Have fun 🙂

Fighting GAFAM… it’s not easy.

State of play

Until recently, I was what you might call a pure Google product… visiting websites with Google Chrome, having several personal Gmail accounts and a GSuite for my pro mail. I also had synchronized drives… and an Android mobile! Anyway… he knew everything and I didn’t care… you know “I have nothing to hide…”

This has got to stop!

The summer of 2019 marked the beginning of a change of ideas! It’s only the fools… all this you see…

  1. I started boycotting Amazon… in favor of European or French e-commerce sites… when the American giant decided to defer the tax on French merchants using the platform…
  2. I wanted to decrease the use of Google products, starting with my personal and professional emails, in order to replace @gmail.com by personalized domains…

Let’s trust French products and startups!

Yeah! France has a startup that makes degoogling its hobbyhorse, I named mailo.com.

On Twitter, @hellomailo is very active on the evil that Google represents … I gave in to the sirens … especially since they have a family offer rather nice (on paper anyway).

What does the mail family offer consist of?

Basically, they offer to secure your children’s email accounts by filtering the correspondents through an approval of the address by the parent(s)…

Concretely, if a correspondent is not in your child’s address book, the email is directed to your Spams (already it’s starting to suck) for validation… if you validate… your child receives the email… ( but the address is not added to the address book => not very logical in my opinion )

If your child adds a contact in his address book, he will only be able to send him an email when you have validated the contact (that’s good… you should say that too!).

In short, not everything is ready but the offer is young and will be (I hope) improved.

So? What’s wrong with you?

Well, what doesn’t suit me is that the offer is young but a correct customer support (because I paid a subscription) should follow… and it doesn’t.

My kids sync their mail on Thunderbird. As the contacts have to be validated by myself, that they are then added to the online address book… they should be synchronizable via Carddav as my adult account… which is not the case… or I didn’t understand…

If you don’t understand… it’s not Mailo’s fault!

That’s true… but if I, a web professional, didn’t understand… what about Mrs. Michu?

And even so… I send emails to several addresses found on their site… no answers. I don’t miss an opportunity to challenge them on Twitter where they are active… and I don’t get any feedback…

How’s your professional e-mail coming?

To manage the @thivinfo.com emails, I was at G Suite (did you notice the time spent?) and I’m not at Mailo… seeing the little reaction on the private part, I thought it was not a good idea to entrust them with one of the most used means of communication in the professional world…

For my Pro mail, I trusted the Swiss host Infomaniak and its mail hosting offer for 1.5€/month. And I have to say that I am quite satisfied.

  • The service works well (Mail /contact / calendar synchronized on Thunderbird and Android smartphone).
  • support in case of questions is very responsive, reachable by mail, phone and instant chat depending on the time and day …

Courage… let’s run away

You’ll understand, I’m not going to make old bones at Mailo.com and certainly migrate everyone to Infomaniak.

Only downside, Infomaniak does not offer a filtering solution as Mailo offers for children …