Stack Exchange Network

Stack Exchange network consists of 175 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
29 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
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
349 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
121 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
34 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
430 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
47 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
117 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
69 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
26 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
61 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
258 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
986 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
876 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 ...
3
votes
0answers
96 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
344 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
647 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
281 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
379 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
54 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?
2
votes
1answer
738 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
735 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
105 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
442 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
361 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
276 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
9k 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
151 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
748 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
118 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
562 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
131 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
496 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
949 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
273 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
2k 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
378 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 ...
0
votes
2answers
825 views

Preventing Canonical Redirect for CDN

I want to run my entire WordPress site through a CDN to improve performance (HTML, not just static CSS/JS/media). Lets say the origin server is example.com and www.example.com is the URL where traffic ...
0
votes
2answers
859 views

W3 Total Cache + S3 + Cloudfront. [closed]

For a small site, what WordPress/site files normally go into the S3 bucket in order to get optimal use as a CDN?
1
vote
1answer
680 views

Is W3 Total Cache supposed to delete the local files after they are uploaded to CDN? [closed]

My site hosts/sells hundreds of photos. To optimize the loading of each image in the front-end I decided to use CDN. The plugin I'm using for that is W3 Total Cache. My question is; is it supposed to ...