How to Setup Cloudflare on WordPress website for speed and security

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi my name is Karthik from design school bwp algorithm.com in this tutorial I'll show you how to set up cloudflare on your website and what exactly is cloudfare it makes your website secure at domain level by protecting your website from threads and other security issues second thing it makes your website Faster by offloading some of your requests for on your website so again this happens at the Domain level and I'll show you how easy it is to add a website to your cloudflare account let's get started sign up with cloudflare and log into your cloudflare account and once you do you'll be presented with this dashboard I already have a website added to cloudflare now on the right corner at the top you see there's a button called ad set just click on that and just name your website just enter the domain of your website you don't have to add HTTP or https just add the domain and extension so in this case I'm adding a website called ciao karthik.com and just click on ADD site and this is just the beginning of the configuration it will ask us to select our plan now the free plan is more than enough just click on the bottom most box that you see here these three are paid just click on this it gets selected just click on continue and that takes us to step two it will scan for our DNS records and it has already done that we want both of the record to be pointing to cloudflare so that it can handle all the attacks on our domain at domain level so just leave these as is and just click on continue if you have ww and normal version of your website now again once we do that in the third step it is asking me to log into my namecheap account now based on where you purchased your domain It'll ask you to log into your domain register well if you don't have a website yet I'll leave a link to a tutorial on how to do it from the scratch in this case my website is on digitalocean but my domain is from namecheap so it's asking me to log into namecheap and replace these name servers with this so that's what we're going to do so I logged into my name Jeep account and here's my website called ciao karthik.com and I'll just click on manage we just need to replace the name servers so as you can see under the domain I have name service option we just need to remove these and we just need to replace them with what cloudflare has given us so I'll just click to copy this name server so I'll remove the first name server and paste the one that cloudflare has given us I'll do the same with second and third ones so I'll go to the second name server click here copy this and then paste it in here and just click on the save button and once you do the name service will be updated and it might take up to 24 hours or 48 Hours usually it happens within few minutes so just wait until it's done so once you're done updating your name servers just give it some time and then click on this button which says done cloudflare will actually send you an email when the website is successfully added and that will be reflected in your dashboard so just be patient and wait for it I'll resume this tutorial once my website gets added once I get the mail now within five minutes my website got added and I got a mail the same should happen with you and if it didn't just wait for some time until your website gets added so click on your active website now we need to configure each and everything so again let's click on preview settings that will take us to this screen I'll click on get started and select this click on Save that will take us so just always use https so that's a good thing click on Save and select all of these options Minify basically reduces the file size so it serves all of these things on your website quite quickly basically web your website will be faster while loading so check all these boxes and click on Save now in case if something breaks your website just try removing either JavaScript and then trying it again but usually it shouldn't break your website if you configure it correctly and also leave this option checked and click on save so that is a basic security guide click on finish and cloudflare is already doing its thing now we need to be more clear so once you click on your website cloudflare gives you all the things that you can change on your website let's start with the very bottom option which is scrapes Shield now these options are selected just check them so that Bots won't be able to harness emails which are publicly displayed on your website also just turn on this hot link protection so other websites cannot user images which is a really huge bonus just with click of a button this can be done and it's really awesome so custom pages is an option which is exclusive to Pro account you can see most of these are pro features so leave them as is click on network you can basically leave all of these at their default we'll come back to rules again click on caching and I think you can leave all of these and in case you're actually developing your website under caching click on configuration and just turn this on so that your website changes will be reflected in real time you don't have to purge cash from cloudflare every time you make a change developing your website locally and moving online well you can skip the step but development mode just in case you're developing your website or making any changes to it just turn this on temporarily and don't forget to turn it off when you're done with that you can also turn this option on I've personally ever used this but you can turn it on just to make your website even a bit faster okay after caching well we'll go back to rules and these are specially designed for when you have different requirements for different pages well when you add a website to your cloudflare account automatically all the pages and everything is cached but let's say you just want a different setting for admin page or a preview page and that's when you add specific rules to do specific things on specific Pages enough talk let's actually get into the rules so click on rules click on page rules and click on create page rule well essentially this will ask you for your url if your website has a www.version just type www dot before your domain since my website is just normal version which is this you can just type that and you just need to type the URL of the page that you're trying to change or manage right so the first thing is this admin page right and anything that comes after that so this asterisk especially specifies that any page that has this pattern which is ciao karthik.com forward slash WP hyphen admin and there can be anything after that which is what this asterisk stands for then do the following things essentially if we don't want to Cache our admin Pages because it should be live and we should change we should see all the changes in real time so let's actually do that also we want security level to be at the highest so I'll just pick security level I'll click here and I'll just click on hi so that is the first setting because we want our admin pages to be of security level high so any Bots anything that visit your admin page they'll be rejected or presented with challenges and they won't be able to even try your login and username so that is a huge bonus and the second thing is that click on cash level and we don't want to Cache anything because we want everything in our admin interface to be real time so whatever we have on our website we want to see it in real time we don't want to see the cached version so click on cash level and click on bypass so we are essentially saying to cloudflare that anything in the admin page should be real time and not cached version I'll just click on here and scroll down and there's something called disable apps well anyway I didn't use any apps but if you are using any of the cloudflare apps just disable them on admin so that you can see everything without the distractions and also we need to pick one more thing which is to disable performance essentially we are getting real-time updates on all of the pages that start with this so again once you pick all these replace.com with your website and your extension if you are using again www dot version of your website of if you have configured www dot version to be your actual version in WordPress then just put www dot here but I'm just using the normal version which is HTTP ciao karthik.com and rest all should be same all these settings should be same and once you pick all these click on Save and deploy rule so that is the first rule that I recommend you can simply follow this tutorial and this is all you need I'll click on page tool now the second thing is again my domain and there can be a preview so whenever we are trying to preview something we don't want any cached version of that page right essentially this happens in Elementor many people comment that I'm not able to see the real version of the page well this is what happens so this page rule will make sure that we're actually seeing the live version of the page again we have to pick similar settings we have to click on Cache level and click on bypass again we have to disable performance and we have to disable all the apps in case you've enabled any apps just disable all the apps and just click on save changes so that should render the preview in real time so those two are the most important settings and there are few more page rules which I don't really use on any of my websites but you can still try them so let's say you have a page which you don't change so much so let's say I have a contact us page and the URL of it is this maybe contact us or contact or anything you can do the following settings you can pick browser cache TTL and maybe you can set it to one day so essentially your browser will render new version of the page every day so it won't check for changes in the page so basically you're essentially caching this page and storing it for one day in your browser so once you select browser cache TTL the next thing that we need to check so essentially how frequently cloudflare will request page from your origin server which which is your server so you can set it to as long as 14 days or even a month essentially since this page contact us page is not going to change let's assume that you're not changing it you can use this you can always Purge specific pages in cloudflare by using custom Purge so that's not a problem in case you change it you have to purge this specific page so that the actual changes are reflected but if you're not changing any of the page you can set this to a month and then you can set cache level to Cache everything instead of bypass cash which is quite the opposite cache everything so this caches the HTML and basically everything else on the page so it the page loads really fast and since it's not really changed the cached version can always be served to the user so these are the three changes and this is not something that I would use but in case you want to use it on any of the pages this can be contact us page this can be your disclaimer page this can be any page you can use on any of those pages but I generally don't recommend using this I recommend using digitalocean and digitalocean is fairly stable but if you're using a shared hosting maybe you can cache some of the pages like three of them like this and save and deploy this rule but I'm just going to cancel this and these are the page rules that you need to manage and once you're done with that you're good to go and you can proceed with the next section now once you're done with the caching section we'll proceed to the speed section click on optimization since my site was recently added there's not much cloudflare can present me with if it's an old site if you have added it maybe you can check it after 10 days or something it will show you some details you can enable this broadly compression at server level so this will speed up your website quite a lot and one more setting that I recommend using is rocket loader but you have to check carefully if your caching plugin and if your plugin configurations are okay with this sometimes it might break your website and if something goes wrong just turn this off and Purge all the cash and try you visiting your website again but again take a backup at your server level and also add also at WordPress level and then try this rocket loader feature it's totally up to you if the website is working fairly enough good enough you can turn this on and leave it as is even this will basically improve the performance of your website and the next thing we're taking a look at is the security tab click on security click on Waf which is web application firewall and as you can see it will be empty for you so click on create firewall rule now the Only Rule that I use is to block admin access because WordPress admin is a highly sensitive area so just type block admin access you can just type anything you want and down here instead of selecting the fields click on edit expression and copy and paste the same expression there will be a link to article from which you can copy this so just go ahead and copy this and replace your IP address with your actual IP address well how can you find the IP address well just Google it just Google what is my IP and Google gives you your IP address just copy and paste that in here right and click on deploy firewall rule what this essentially will do is that it will block every other IPA address from accessing your WP admin area or WP login area which is a huge bonus now also I want to point out that every time you connect to a new network your IP address may change so you have to tweak this rule every time you if you're on the go well you have to copy your new IP address every time or you can put a comma and add on your new IP address if you are traveling between your work and home you can just put a comma and use another IP address if you're just using one network just put in your IP address and this rule should work just fine also down here you have to make sure that the block mode is selected so anyone who's trying to access WPA admin or WP login if it's not in this IP address list it will be blocked as simple as that and don't forget to replace your IP address with the IP address that you find out you can just Google what is my IP it gives you IP deploy firewall Rule and that should protect you from all the threads it will only let this IP address through this WP admin or WP login area but it will block the rest all IP addresses so that's a huge security update and at any time if you want to tweak the rule just go to cloudflare log into your account click on this settings Cog and just replace this or just add a comma and put another IP address that you want or you can simply paste your IP address it should look something like this this is not my IP address I just put it as an example right so every time you have find a new IP address added after a comma or just replace this value with that value and that should let you log into your WP hyphen admin area otherwise it will just block and give them an error message so that's what you do and don't forget to click on Save once you make the necessary changes and after that click on sslts TLS click make sure the full mode is selected you can also toggle this on and that's pretty much it that's how you make your website secure and fast using cloudflare now some people call it a free CDN well it is partially a bit of CDN it's more like a proxy service which acts as a proxy between your visitors and your actual website so it makes your website faster it makes your website secure and protects you from all kinds of threads so definitely use it and best of all it's free if you want more tutorials like this head over to Wordpress tutorial for beginners playlist on the channel and I'll see you in the next one don't forget to subscribe and give this video a thumbs up and I'll see you in the next one bye
Info
Channel: Design School by Wpalgoridm
Views: 6,676
Rating: undefined out of 5
Keywords: cloudflare, wordpress, speed up wordpress website 2020, wordpress cdn cloudflare, wordpress cdn free, wordpress cdn setup, cdn wordpress plugin free, cloudflare cdn free, secure wordpress website, use a content delivery network (cdn) in wordpress free, cloudflare to wordpress, cloudflare wordpress tutorial, connect cloudflare to wordpress, cloudflare dns, cloudflare dns setup, increase website speed, how to setup cloudflare, wpalgoridm, design school
Id: O8JwpudvOmo
Channel Id: undefined
Length: 17min 17sec (1037 seconds)
Published: Thu Aug 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.