✅WORDPRESS OPTIMIZATION GUIDE! FROM 3 TO 1 SECOND LOAD-TIME❗❗

FatBee

i was got a good results every time after applied wp rocket and few other plugins.. i got mobile 95 speed and pc 98 speed all the time.. but the matter is when i place my adsense ad code into the site, my page speed score going down :( . mobiles speed reduce up to 75-80 .... so can you give me the idea to use adsense code without drop page speed in mobile?
 
FatBee

i was got a good results every time after applied wp rocket and few other plugins.. i got mobile 95 speed and pc 98 speed all the time.. but the matter is when i place my adsense ad code into the site, my page speed score going down :( . mobiles speed reduce up to 75-80 .... so can you give me the idea to use adsense code without drop page speed in mobile?
Its normal with adsence.
 
How can i create this anyone have a idea in wordpress
that box and below that a download link in post
 

Attachments

  • ss+(2020-07-10+at+06.59.38).jpg
    ss+(2020-07-10+at+06.59.38).jpg
    50.3 KB · Views: 93
Could you guide me which one is best cache plugin using without CDN? Present I am using WP Fastest cache (free) but did not get good result at gtmetrix. It gave me last result (today)
PageSpeed Score > 11%
Yslow Score > 55%
Full loaded Time > 5.2s
Total Pase Size > 4.95MB
Requests > 160
I think it is a very bad result. Is there any guidance. I am eagerly awaiting for some valuable guidance. Thanks in advance.
 
Could you guide me which one is best cache plugin using without CDN? Present I am using WP Fastest cache (free) but did not get good result at gtmetrix. It gave me last result (today)
PageSpeed Score > 11%
Yslow Score > 55%
Full loaded Time > 5.2s
Total Pase Size > 4.95MB
Requests > 160
I think it is a very bad result. Is there any guidance. I am eagerly awaiting for some valuable guidance. Thanks in advance.
Wprocket? Nitro?
 
- Serve static content from a subdomain. AKA cookie-free domain!

This will greatly reduce the service time of your static content there for the load time will gain boost!
This is a bit technical and I strongly advise to make a backup before proceeding to this.

Let's start with the cPanel (aka subdomain creation)

1. Go to your cPanel > Subdomains > Create a Subdomain
2. I will name the subdomain as static (static.website.tld)
3. Change Document Root to public_html/wp-content
4. if you are using Cloudflare go to your Cloudflare dashboard and add new record A, name it static and point it to your IP.
View attachment 134673
5. Now, look for wp-config.php and insert the following lines


Code:
/** Cookie-Free Domain. */
define("WP_CONTENT_URL", "https://static.website.tld");
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );


I guess I don't need to tell you to change "website.tld" to your domain name.

6. Now you must redirect all the posts to the new subdomain. Simply, run the following command in the SQL Database via phpMyAdmin.

Code:
UPDATE wp_posts SET guid = REPLACE(guid,'website.tld/wp-content/','static.website.tld/')
Code:
UPDATE wp_posts SET post_content = REPLACE(post_content,'website.tld/wp-content/','static.website.tld/')
View attachment 134679


7. After completing all of these steps, go to your page and refresh it. See if there is any error.

EXPECTED ERROR: Problem loading web fonts, FontAwesome, etc. due to CORS policies

8. (Fix) I'm using RankMath for this one. But you can edit it directly or with any other plugin that can do it.

Go to your .httaccess file and add the following on the top line.
Code:
#CORS FIX
<IfModule mod_headers.c>
<IfModule mod_rewrite.c>
    SetEnvIf Origin "http(s)?://(.+\.)?(static.website\.com|website\.com)(:\d{1,5})?$" CORS=$0
    Header set Access-Control-Allow-Origin "%{CORS}e" env=CORS
    Header merge  Vary "Origin"
</IfModule>
</IfModule>
#CORS FIX END

Note: Change "website" to your domain name and ".com" to your own TLD.
Let´s see if I find you in a good mood today.

I have a question specifically to point #3...
3. Change Document Root to public_html/wp-content
This is assuming the site´s files are actually stored on public_html/wp-content, right?

Or that´s something that has nothing to do with this step?

Because, when installing WordPress on a 3rd site on my hosting, it didn´t install on that path but rather on /home/mycpanelusername/
 
Let´s see if I find you in a good mood today.

I have a question specifically to point #3...

This is assuming the site´s files are actually stored on public_html/wp-content, right?

Or that´s something that has nothing to do with this step?

Because, when installing WordPress on a 3rd site on my hosting, it didn´t install on that path but rather on /home/mycpanelusername/
Yup, you got it right!
Explanation for dummys: you follow the path where your wp content actually is
 
how does one set up a cookie-free domain alongside a CDN?
 
prefetch.xyz is not working any other option? I did not find out another option. Please provide.
 
The query needs to run on the wpel_posts table?
I am having issues with this step. I am pasting and running the query on that table but I am getting an error. On the guide, you don´t specify on what table inside our MySQL we need to run it.

prefetch.xyz is not working any other option? I did not find out another option. Please provide.
WebPageTest and Pingdom will do this for you.

On WebPageTest, head over to the DOMAIN tab and check the Content breakdown by domain, at the bottom-right, you will see the info you´re looking for...
b4094582a9eebbbb82d457e7cdba22d6.jpg

And, on Pingdom, you can scroll a bit down and check on the bottom-right, a box called "Requests by domain", there, you will also see all external resources being requested by your site.
dc1f558146f01babb25265b1144b77ac.jpg

Cheers!
 
Last edited:
I am having issues with this step. I am pasting and running the query on that table but I am getting an error. On the guide, you don´t specify on what table inside our MySQL we need to run it.


WebPageTest and Pingdom will do this for you.

On WebPageTest, head over to the DOMAIN tab and check the Content breakdown by domain, at the bottom-right, you will see the info you´re looking for...
b4094582a9eebbbb82d457e7cdba22d6.jpg

And, on Pingdom, you can scroll a bit down and check on the bottom-right, a box called "Requests by domain", there, you will also see all external resources being requested by your site.
dc1f558146f01babb25265b1144b77ac.jpg

Cheers!
Thats why i have an option if you are lazy or you have no clue what to do. Its in front of you.
 
Back
Top