Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cdn]

Content delivery network, a distributed system of servers deployed in multiple data centers.

0
votes
1answer
24 views

Storing WordPress Media Library Uploaded files onto a separate domain

We are looking forward to offload assets from our website (60GB onto a 8TB/mo accessed website), to a separate webserver that will be there only for serving images from a separate domain. I know that ...
0
votes
0answers
16 views

WordPress Icons Disappeared After Setting Static Contents

I had issue on YSlow while testing site speed, i found error, where it says that make your domain "Cookie Free" so i followed instructions on KeyCDN website here I correctly followed all the steps as ...
0
votes
0answers
22 views

Alternatives to hosting WordPress post content?

Our posts are very verbose HTML documents that average 5MB in file size. Although the WordPress database does a decent job of serving these files, it costs us a lot in storage hosting. Due to this, is ...
0
votes
1answer
153 views

i1.wp.com url problem (Jetpack not installed)

I added the following code to the functions.php file add_filter( 'avatar_defaults', 'new_gravatar' ); function new_gravatar ($avatar_defaults) { $myavatar = 'link'; $avatar_defaults[$...
0
votes
1answer
80 views

Unable leverage Browser Caching on AWS Bitnami stack (Apache) through W3TC and Cloudfront CDN

I followed many tutorial about leveraging browser caching nevertheless I couldn't configure it succesfully, in fact GTmetric (PageSpeed and YSlow) notified me many static file that don't have a cache ...
0
votes
0answers
31 views

How do I replace the images URL in widgets?

I wrote the script below to replace the URL of the images in the post content with the WordPress CDN link. (Yes, I know the Jetpack, but in my case I can not use it) <?php add_filter('the_content',...
1
vote
2answers
203 views

Host images only on CDN

i have developed a wordpress website which is hosted on AWS. The website is working fine but since i wish to make it an e-commerce website, there are going to be a large number of images. The hosting ...
1
vote
0answers
34 views

WP-Stateless: Multi Regional Vs Regional Storage

if I upload all wp-content/uploads to google cloud storage and serve from there directly(stateless), is there any point to create multi regional google cloud storage? Other than increasing unnecessary ...
0
votes
0answers
98 views

correct way to call images from Photon CDN

I am having a bit of difficulty finding the correct way to call images from the CDN that I use - Photon from Jetpack Prevouisly - called them direct from the upload source wp-content/themes/mytheme/...
0
votes
0answers
55 views

Serving cache from multiple domain names

I'm using W3 total cache for caching and I've many js files with sizes larger than 100KB in the cache folder. My idea is to serve cache folder from different subdomains (All files are hosted in the ...
0
votes
0answers
24 views

Uploads from site on Server A uploaded on Server B (Like sort of CDN)

Short overview of the situation: On server A there's an site. Server B is used for files. I want that uploads made on server A (running one wordpress site) are uploaded on server B. I've changed the ...
-2
votes
2answers
52 views

How should we improve the website speed? [closed]

We are OK with the current performance but for the past 2-3 weeks, Google search console shows that none of the pages are indexed. Its actually indexed though. https://www.softwareproductguide.com/ ...
0
votes
1answer
209 views

CORS policy errors

Okay, so I recently set up CloudFront but for some reason, I keep on getting CORS policy errors on two of my font files. I have the .htaccess edited appropriately (See code below) and I have ...
0
votes
1answer
844 views

How to set up the REST API to refer to media on a CDN

I'm using the Wordpress as a headless server to supply the content for a react based web app, and I'm trying to get the media served via a CDN. I have set up the W3-Total-Cache plugin which is ...
0
votes
0answers
30 views

Render Shortcode in Lightbox Gallery

I am trying to have a video gallery, but I use HolaCDN. Their wordpress plugin lets you insert videos using a shortcode, and that shortcode inserts the necessary javascript to render their video ...
0
votes
1answer
789 views

Change Image URL to a CDN

Running NGINX, Wordpress 4.75 after upgrading from a way older version of Wordpress, our images are being served locally and I would like to change that to our CDN. In the past images that were ...
0
votes
0answers
48 views

Cdn not shows compressed images

I use cdn to serve my images, I have compressed my images(featured images) using the hook 'wp_insert_post' (by replacing the original image with compressed ones) but when I open the article, it ...
0
votes
0answers
60 views

Images not showing on ALIAS url

I have a website that is using 2 templates based on the URL. The site is www.penciloffice.com and then I have an alias called www.ofeqiq.com for which the images are not showing. I'm using W3 Caché ...
3
votes
0answers
93 views

CDN + WP Admin Query - .htaccess redirection

Say I have a website at https://www.example.com and I am using a CDN. Now if I want the CDN URL to be https://www.example.com/assets/... and not https://assets.example.com, then what should I do? Is ...
0
votes
0answers
322 views

Css style removed but still showing via CDN even after clearing browser cache and purging all caches for site

I have an issue where the mobile menu (Must change browser size to mobile width to see) is showing one of its lines as "display:none" via the stylesheet. So the hamburger icon is wrong. See screenshot....
0
votes
1answer
618 views

I am using CloudFront and Cloudflare at the same time. Is that good? [closed]

I'm running my site using two CDNs. I primarily just use Cloudflare for security, and CloudFront for complete CDN.
-1
votes
2answers
248 views

how optimize CDN without using plugins

i need help for optimizing my wordpress website without using plugins incloding wp-total-cache or wp-super-cache.check this link https://gtmetrix.com/reports/akhbartop.ir/fF37Flwa my website needs ...
0
votes
1answer
337 views

Missing dns-prefetch link when using “nested” wp_register_style

Given this script: function register_styles(){ wp_register_style('google-fonts', '//fonts.googleapis.com/css?family=Oswald|Open+Sans'); wp_register_style('bootstrap', ...
1
vote
0answers
52 views

How to configure sub-domain for images on Debian Apache VPS?

in shorts: I want this https://surpriseazwebservices.com/serve-images-from-sub-domain-in-wordpress/ BUT, I have VPS with Debian runing Apache and WP. I follow all steps from tutorial and not working ...
-1
votes
1answer
29 views

All my cdn links are automatically set to relative(ie //: instead of http://). why? [closed]

All The links declared are set to :// instead of http:// even though they have https added in the code. This is causing a issue with AMP page validation. Is there a way i can force http:// here?
1
vote
1answer
582 views

Deregister WordPress jquery on specific page

Note: Removing jQuery that comes with Wordpress is not recommended. Use caution if implementing the solution below I have a few pages that will not require jQuery to be loaded in the header. I'm ...
3
votes
2answers
689 views

What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?

When I run "themes check" , it recommends not to use CDN. I am using Bootstrap CDN this way function underscore_bootstrap_wp_scripts() { /* bootstrap and font awesome and animate css */ ...
-2
votes
3answers
99 views

To what degree can use of caching-plugins and a CDN boost WordPress performance? [closed]

I realize that this question is being asked in a very generic fashion, without detailed specifics of the configuration in question, and thus I am not expecting answers that go beyond anything but ...
2
votes
1answer
5k views

Add Font Awesome Embed CDN Script To WordPress

This is my original code that pulled Font Awesome icons, which is placed in my functions.php file: wp_enqueue_style( 'prefix-font-awesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.1/css/...
0
votes
1answer
405 views

How to serve wp-includes javascripts from CDN? [duplicate]

My goal is very simple to describe: I want all JS from wp-includes to be served via my CDN (cloudfront to be specific). This just means I need to change the domain from: http://mywebsite.com/wp-...
1
vote
0answers
351 views

change url for static files in /wp-admin with a cdn url

I recently purchased a CDN and used a plugin to change the site url for all static files in the "/wp-content" and "/wp-include" folder to the cdn url. Is there a way to change the site url for ...
0
votes
1answer
255 views

How do I change the WordPress Address URL only and still login to wp-admin

The story so far: I added a distribution on Amazon CloudFront (randomString.cloudfront.net), then added a cname (cdn.mydomain.com) and finally created a cname record on the DNS server - pointing cdn....
2
votes
2answers
8k views

COOKIE_DOMAIN setting confusion

I'm upgrading my website and it's using WordPress. I'm using sub-domain cdn for CDN and it needs to be cookieless. Currently my website is a multi-network of multisites (both are subdirectory ...
0
votes
0answers
103 views

Moving CDN jQuery to footer does not work?

What I want to achieve: Change the default JS to Google's CDN --> this works Move the Google CDN to the footer --> this does not work My code: function my_init() { if (!is_admin()) {...
0
votes
1answer
149 views

How to use Virtual Private Server as Wordpress Image CDN

I have 2 Private Server and 1 Shared hosting. 1 of my private server is not much in use, but my shared hosting is getting overloaded with images running wordpress. I want to set my own CDN with my ...
0
votes
1answer
720 views

W3 total - leverage browser caching not working with cdn delivered images [closed]

I'm using W3 total cache for a while now with all my Wordpress installations. Just started to use CDN and I got some problems with leverage browser caching of my files (mostly images) that are served ...
0
votes
1answer
117 views

Should I paste CDN links in a JS file or use a Bootstrap CDN plugin?

I'm new to WP development and I don't have the experience to know if I should place CDN links in a JS file and enqueue it or use a nifty plugin such as this one. What is best practice? What should I ...
0
votes
1answer
556 views

Enqueueing a script and a style sheet not working

I am trying to enqueue both a child theme style sheet and a child theme script. I need to enqueue the script because I put CDN links in there for Bootstrap. I know my enqueue isn't working correctly ...
0
votes
2answers
127 views

Change WordPress Resource URL

I have recently finished developing my latest WordPress theme for my own site and as usual I was going to use maxcdn and w3tc to make it faster! However my Hosting company have started up their own ...
-1
votes
2answers
2k views

Can not login after moving to cloudflare and adding rules

I've setup my website with CloudFlare. In the settings, I've added some rules to make it faster. Since then, when I try to login the Dashboard. I get the following message: ERROR: Cookies are ...
2
votes
2answers
3k views

Change WordPress' media upload URL?

This isn't the usual "How do I change the media upload folder?" question. Our entire site is run through a CDN. The CDN drops POST requests with a 5-6MB file so the WordPress uploads fail. I can work ...
1
vote
2answers
470 views

Can a Wordpress blog be entirely hosted on a CDN if cached?

I am developing a Wordpress blog for a client who believes that more than 1m pageviews will be served every month. Unfortunately his server resources are very limited so I was thinking of hosting the ...
0
votes
0answers
44 views

Is it possible to change the images source that are shown in the admin side?

All of my images are in a CDN. On the website that's where the images are coming from but on the admin side it is pulling them from the server. Is there a filter or action I can use to change the ...
6
votes
5answers
19k views

wp enqueue script using scripts from cdn with a safety callback

I want to include several scripts and styles from a remote CDN... in this case bootstrap and similer files but i want to provide a safety net in the form of a callback in the case the CDN is down for ...
1
vote
0answers
913 views

Change media URL (images)

Similar questions have been posted, but none have been resolved. I'm looking to, programmatically on upload, change the URL of a media file to its URL on a CDN. I.e. modify site.com/wp-content/uploads/...
11
votes
2answers
10k views

How to provide a local fallback for Font Awesome if CDN fails?

I'm trying to develop a Wordpress theme and figure out how to provide a local fallback for Font Awesome if CDN fails or I develop my theme on a local server without internet connection. The solution ...
0
votes
1answer
272 views

force_ssl_admin() causing issues with preview links

I have recently enabled my WordPress website to use an SSL Cert for administration/login pages. I am using the plugin W3 Total Cache with my Content Delivery network. I have noticed that when I am ...
0
votes
2answers
1k views

Change the URL of an image from wp_get_attachment_image_src

I call a lot of images with wp_get_attachment_image_src() and would like to off load those images to a CDN. Is there a filter to grab the URL and change it?
4
votes
3answers
10k views

Where should I host my images?

I just read this article http://codex.wordpress.org/WordPress_Optimization/Offloading on how you can upload your content to external sources to improve speed and save bandwidth. Anyway, my site has ...
0
votes
2answers
266 views

How do you load js and style resources from CDN with local fallback using wp_enqueue_scripts?

I had a hard time finding the correct way to do this. I want to load the CDN resources here: http://www.bootstrapcdn.com/ but use wp_enqueue_scripts and have local fallback. This is the method I am ...