How to Setup a CDN for All Content?

To totally bypass WP, just use the CDN native interface or a utility like cyberduck to upload you files directly to the CDN and embed the file from the “From URL” tab at the add media thing. This can work with files and video but will be problematic with images as WP process images to … Read more

Comment Moderation and CDN Caching

Figured it out. Looking at wp-comments-post.php there is a filter called comment_post_redirect which I used to check if the comment was approved and then added a query string to the URL. So easy. //A query string needs to be added when redirecting back to the post after a comment is posted and not approved. This … Read more

Enqueueing a script and a style sheet not working

In the context of parent – child themes, be aware that: The get_template_directory_uri() will give you the parent theme directory uri: https://codex.wordpress.org/Function_Reference/get_template_directory_uri. The get_stylesheet_directory_uri() will give you the child theme directory uri: https://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri You are enqueueing parent-style with get_stylesheet_directory_uri(), which will give you the child theme directory uri. You are enqueueing child-css and child-js using … Read more

Host images only on CDN

I’ve never heard of a CDN that replaces your servers storage completely, only mirroring. However, I know (as I’ve done this on multiple installs) you can offload your current and future media library items to AWS S3 with a plugin like Media Cloud. Media items get off of your pricy and limited hosting server, and … Read more

Is it possible to host a WordPress site entirely on Cloudfront?

It depends what you mean, entirely on Cloudfront. Cloudfront is a CDN only. It can’t run any server side scripting environments (PHP or MySQL), it therefore isn’t possible to host a wordpress site entirely with Cloudfront. You could alternatively use Cloudfront to host your images to improve speed. The closest way to host a wordpress … Read more

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

Yes, making static version of WP blog is definite possibility. I would advise against using caching plugins for that — it’s not their purpose and a lot of their functionality tends to depend on elaborate rewrite rules, which you won’t be able to replicate on CDN. There are dedicated WP solutions (none that I have … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)