Importing existing s3 Media into WP

In theory you’d think it could work like that. In reality, it doesn’t. There’s a simple reason no plugin exists that would do this. Whenever you import media into WordPress, it creates thumbnail files of various sizes, (even for videos). In order to create those thumbnails, it has to download (you guessed it) the entire … Read more

How to fix AWS SNS API end point code that cause site not to load?

The root cause is this: function sns_endpoint_data() { // this line caused the site not to load $message = Message::fromRawPostData(); /* additional code follows… */ } add_action( ‘template_redirect’, ‘sns_endpoint_data’ ); There is no if condition checking if this is indeed the URL you desired to do this on. As a result, the Message::fromRawPostData() will load … Read more

How to prevent redirection from non-www to www or vice versa?

So how to prevent the redirection? On the front-end/public side of a WordPress site, that redirection is done by redirect_canonical() which is hooked on template_redirect, and if you really must disable that non-www to www or www to non-www redirection, you can try the following (add the code to your theme’s functions.php file): For disabling … Read more

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