 Muchas gracias por estar aquí, vamos con Finit Talwar, lleva trabajando con War Press desde 2012, confundó su primera compañía a los 20 y es cofundador y responsable técnico de Firemat FM, Radio Digital Online basado en War Press y también es responsable de Indicium Crest, una agencia de desarrollo remoto. Es consultor técnico en varios proyectos, actualmente vive en Frankfurt. Su hobby es la fotografía. Además, una de las compañías Firemat FM es media sponsor de Work on Europe. Es importante. Decidimos que nosotros somos nomás. Por favor, un falta de plazo. So, yeah. So, so today's my talk will be about multi sites and how you can affect maintain your installations. Maybe everyone will be using multi sites, but there will be some aspects that are untouched or maybe not explore or not everyone will be aware of. I will be trying to, I'll try to explain all of these things today. Companies around the world use War Press for development like a lot and you know that we are like 30% of the internet now. So, yeah. I used to consult an agency like two years back and they were like, they were maintaining so many War Press installations for like one client, one installation. They're like, they're like so many of them. But what about the server? What about the updates? What about the maintenance? What about the get-hack? I mean, for that way, you have to have think about your company's perspective, your server cost, everything. You can do that effectively using multi sites, you know, like how about setting up one installation and maintaining all your client side. That's possible. And that we've got to talk about it. So, if you have 100 clients, let's say two, two stage each client, like integration stage, testing stage, you may end up like 200 installation, you don't want that, right? So, that way, we will talk about multi sites. So, people have normal questions like, how do I set it up? So, I will just not go into technicalities of how do you, how do you do things, but I will mostly talk about what are the important things that you need to do it. So, first of all, tell me one thing, how many of you know about WPCLI? I would prefer like, okay, quite a few. And how many of you actually use them in their workflow? Okay, one, two, okay, perfect. So, okay, one of the things I will include with that only. So, people have often concern like, what about my URL structure? If I'm having a multi site, what would be the URL? So, you can have either a subdomain or a sub directory, or you can map your own domain, there are plugins for that. So, it's like you're having x.avc.com. So, you can say y.com. So, you can definitely map it and there are plugins for that. So, yeah, you have questions like, what about I have to maintain multiple stages of multiple client in one installation? You definitely can do that. You have to actually plan it out. For example, you maintain one master installation of your company, let's say xyz.com, your company, and you give them, for instance, like avcintegration, avcclientavc, integrationavc.com. So, that could be one stage. So, another one, you could have it on a subdomain. So, all the installations are maintained over subdomain or sub directory, but that's not a clean way to do it. Like, you will see a long list of installations like, in just one page, but that's not a clean way to do it. There would be one thing called multi-network, I would discuss about it in the end of this slide. So, you will get to know about it. Like, it's how easy and it is. It's just one command, WP code multi-set install. And that's it, using WP CLI and just one command and you can install it. I mean, all you need to do is just run this and it will ask you some parameters, you enter it, site name, etc. The thing that you do it from your browser, you can do it using CLI. So, if you have an existing installation here, planning to convert it to multi-site, simple, just one command, everything. And, but if you're as, as I can see that there are non-CLI users also, you have to use just define this line inside your WP config file, just add this line and if you go back to your website under the tool section, you will see some instructions. Just follow it and your installations would be ready. It's not a rocket site. Simple command, simple thing. Let's proceed further, staging on multi-site and stages creation. As I mentioned that, you can do it on subdomains or subdirectories. That's just the one way to do it. So, for duplication, like, for example, you're ready with one site, but you're like, okay, that could be broken or there may be some changes I don't want clients to see. You can use any duplicative plugin to use, clone one of the multi-site site into another site and give that site to clients for the verification so that they don't know that there's an ongoing development. Just clean it out and give it out. So, that would be one way to do it. Maintaining plugins. They're like, you can maintain as many plugins as you want on this installation. The best way to do it is whatever the plugins that are being used all over the installation, just network activate them. What, try to activate the plugins only on the certain site because every plugin that's being activated, that means certain code is being loaded. So, your page response time is getting changed. So, only try to activate site-specific plugins if there exists. If they have been used all over the network, you have to, you can do a network activation. This, about the themes, this question comes many times that I have three same sites. Okay, but they are on different concepts. I want to use only one theme, how do I do that? Upload a theme, network enable it, then create three separate child themes. Like, three sites that have been used using one theme, create three child themes and load your customization in that site. So, that way you can easily maintain customizations for three different sites. Maintain three child themes for three different sites, one theme, perfect. That way you can easily maintain it. Code deployment, let's say you have to deploy the themes code. Again, if maintain a site-specific child theme and upload your code in that. So, that way you can easily handle it. There would be one more thing. This question comes many times to me about site-specific plugin. Yes, you can definitely do that. If you have any customization, you can either load in a child theme or a site-specific plugin. That's another way to do that. Have you heard about MU plugins? And... Numbers, okay, no. MU plugins are the ones that loaded number one. Loads first just after the WordPress, for example. I'll give you an example. You're having a subdomain multi-site. Okay. And you have SSL-certified only on your master site. You don't want other sites to have SSL problems, it says. Because by default WordPress would say there's an SSL on it. And it won't let you upgrade your network. So, you can write a small plugin, just MU plugins, so that it removes the SSL check. That way you can easily get rid of it. This verification comes under updates screen. So, next screen is... What are the plugins, basically? There's a plugin called WordPress MU Domain Mapping. I think we're from Doncha. That's the best till now. I've found out and I use it all the time. You can simply map your new domain using this plugin. Simple, just add a DNS record. For a record in the DNS. Then go to this plugin and define your domain. That book it for a certain site ID. Let's say site ID 3 would have abc.com. Then just simply save it and that's it. It's all set to go. You don't have to do anything. Make sure that your server configuration is defined. Then comes a question about... What if you see questions about MIX protocol? Or there are some... You see domain changes error. You can use this plugin called Better Search Replace. You just enter one keyword and enter another keyword. For instance, you change the domain. Enter all domain, enter new domain. Save your URL would be changed inside your database. Simple, right? And what about backups? People often ask about how do I take a backup of a certain site? Or how do I migrate my one site to another site? Let's say the site is running inside... One of the site inside multi-site. And I want to make a standalone installation. Or maybe another site inside multi-site. Use a thing called WordPress Importer Exporter. It's inbuilt on your installation. Export XML, go there, import. Your site is imported. The one that I mentioned about Duplicator. This one is a pretty nice plugin. Post Duplicator. Let's say you want to give a client a certain clean installation. Or you only give the clean pages and clean content. You can use this one. Just it would clone your entire post to the certain site. And it can be linked. For instance, if you change on your integration state some content. On the testing state, it would be as it is. You can link this post. That's the best part I found about it. Multi-site clone Duplicator. Using this, you can clone your entire site into another sub-site. Let's say abc.x.com. You could just clone it into another sub-site of multi-site. This one is pretty nice. I found it amazing. And I started using one. This one is from WPM. It's a combination of two plugins. New block templates and clone it. You can set up a block template. I mean site templates. This consider this as a... Yeah. Create templates or sites. Let's say you created five different sites for five different clients. You can set up templates. And you can connect with another client. They have tutorials where you can follow them and you can set up easily. It's like when you open your WP, sign up PHP page and you will see these templates over there. Or you can do it from the backend also. So this allows you to clone. This is another nice tool. CLI as well as for backups, for migrations, CLI, all the time. I would recommend if you haven't heard about it, just try to learn it. It will make your life easier. I can bet on it. Okay. If you maintain your own servers, there are certain times that you have to maintain your backups and all. You can set up using Chrome jobs. For instance, you can use CLI and say, CLI command word WPDB export. And you can bind it to a Chrome job. And it will take backup, let's say, every night at 2 o'clock, your database backup is there. And you don't need to worry about any third party to build that backup to Dropbox and all. So, yeah, a backup is a entirely different thing. So I would just give it a point. SSL, you don't have any excuse now to not have SSL due to Let's Encrypt project. So that's another better tool to maintain your multi-side size. Have SSL, you don't have any excuse now. It's for free. You can use it on your servers. Did you know that WordPress.com is the biggest multi-side? It has, I think, some 50,000 installations come in certain days. I read about statistics, but I don't remember now. So this is one of the biggest installations. It's just one installation and having thousands of, hundreds of thousands of sites. I don't know the exact number also. Okay, what about scaling? Yeah, I have a multi-side. How do I scale it? First of all, you need a better server. You cannot maintain on a very small shared hosting or with C-Panel. You need a better server. I would totally recommend any cloud client, let's say Amazon or Google Cloud. Or I personally use Amazon Cloud. So wait, I'm not the affiliate of the Amazon Cloud, first of all. So I'm not affiliate of any point of anything that I mentioned here. So you can, a better server, you can better manage that. You need a better server stack. If you know, you are using PHP 7 on your sites. Very few. How many of you know what PHP version you are using? Actually, no worry. Very limited. Come and try to interact so that I can serve better. So PHP 7 turns out to be the fastest still now. So my recommended stack that I use on my servers would be PHP 7, PHP 7 FPM. MariaDB for database because better results and Redis as for object cache. Redis is just a client. You just install on your server and configure it on your WordPress website using WC Total Cache. So you can use that. Sometimes there's a question about what if I have big server and now server is getting exploded and I don't want to spend more on the server. What do I do? You can use a thing called load balancer. Running two servers parallel and using the load balancer to maintain the load. For that Amazon ELB is right now, the best tool. Scalable storage. Often there are questions like I am having so many assets. For example, take my case. I am running 29 GB of music right now. So I am not posting on a server. Right? So I am using Amazon S3 to post my music on it. So that way it's better scale and better sound. But Amazon S3 is better use if you're using with CloudFront. I delivered a one talk earlier in Bucharest about it. If you want, I will tweet about it also. So for DNS. Ok, every DNS query is also important. We have a tool called Route53. It's like a scalable DNS. If you haven't noticed, you added an A record in your DNS. And how much time you have to wait? Like 24 horas or 72 hours. Right? Right. So I found out that I never needed to wait. Just I entered and I think one or two minutes is there because it's fastest. Why? Because probably the domain providers, DNS that you might be using probably will be located somewhere in US. So the query takes time and all. And they are like scalable DNS located everywhere. I think it costs like 50 cents a month. So that's cheap. So yeah. Caching is another aspect. Sometimes it's taken mistakenly, but caching also can give you right a great bump of your speed. And if you're really, I would definitely recommend one of these things. So go for it. Cloud front, content delivery network. Ok, you're having heavy assets, movies, videos, but they need to be served. So you can use it. For example, our fund, there are like plugins for these integrations. So in case of your multisite, so that way you can handle it very well. So that way they're like, let's say there are hundreds of sites, you can handle your assets very well using S3 plus cloud front. So this is when you scale. This is when you think that your installation is getting slower. You need these three tools. There could be one way, it's called search. For instance, you're running a production server. I mean, let's say you maintain a multisite installation and you're hosting your client's website. Let's say you're running a WordPress hosting company, for instance, and you're having multisite installation for that. So your clients would need a search for it. A better search gives faster results because sometimes this biological search can turn out to be slow. So there are tools like solar and elastic search. You can use that. Network of networks. Ok, this is a slightly, let's say, let's level up. You're doing subdomain, you're doing subdirectly. What about I need something else? Or what about I'm having like 20 products in my company? I need sites for each and every of them. Do I maintain 20 sites? No. We have a thing called network of networks. So what is it? There are questions like can it have a mixed subdomain, subdirectly, or as well as different domains? Yes. Have you heard about WordPress VVV? WordPress VVV. How many of you attended contribute today? One, two, three, four. Have you built a box over there? WordPress VVV from, right? So try to explore this tool WordPress VVV. It's very good for development. In your development, you can use it. Basically you can set up a local server in your system with very easy to maintain. Just install WordPress VVV, and you can maintain all your local development using that. So what I mean to say is, have you ever wondered how WordPress or OIG, VVPress, WordCam, OIG, can it have a multiple installation or it's just a one installation? It's a one installation. If you see WordPress VVV, you will see the code of it and you will find out how they are doing it. I mean if you see the WP config and their code, you will find out it's just one. Most of them are just one installation. They are handling that. So my point of saying is that you can have a similar setup of using a multi-network and like one login and you can maintain multiple backends using it. All you need to do is just manually configure your server, your DNS records and that's it. What about SSL certificate? Surely if you are handling your own server you just have to define the path, same path like if you write your SSL certificate code you say route in engines or I think in Apache, I don't remember I think. So you just define the same document route over there. So you can use SSL engine. Let's include to generate SSL certificates for you. What about caching? You can define W3 total cache or your site specific or your network specific. Same goes with CDN. First of all, I would like to show you this screen. How this works? This is a plugin called WP multi-network. Configuration is simply you have to configure your DNS and server. You just network activated and you remove this one of the configuration that comes up with integrating MULiSight. So you know that you can maintain MULiSight using here, right? My sites and you can switch to your sites. But multi-network gives you an option of multiple networks and it comes on your master site. Your site number one, you can maintain add a new network and it comes on a different domain. For instance, your abc.com. Let's consider the fact of your clients. Your master site, your client one.yourSite.com, client two.yourSite.com and you can maintain their sites on different subdirectories like client one.yourSite.com slash integration. So that way you can maintain easily you need to plan it out basically how you want to maintain. So just one login and you can maintain multiple networks using that. So the plugins are WP multi-network, WP SSO and yeah, the tool CLI I mentioned to easy to maintain and WordPress VVV. Better look at the code. So one more thing. Should I? What about document route and virtuoso? As I mentioned, it's just your one path. The document route you define the folder where your code is. So that's it. Thank you.