Upload media files to Amazon S3
So I worked out what I was looking for. It seems that all images, when edited or uploaded, have something passed through wp_update_attachment_metadata and so I can hook into that to get the info I need.
So I worked out what I was looking for. It seems that all images, when edited or uploaded, have something passed through wp_update_attachment_metadata and so I can hook into that to get the info I need.
I was able to get a working connection using the following code: function test_connect_to_db() { $servername=”thedatabase.0000000000.location-1.rds.amazonaws.com”; $username=”username”; $password = ‘password’; $dbname=”database”; // Create connection $conn = new mysqli( $servername, $username, $password, $dbname ); // Check connection if ( $conn->connect_error ) { die( ‘Connection failed: ‘ . $conn->connect_error ); } $sql=”SELECT id, firstname, lastname FROM table”; … Read more
Yes this question probably belongs in an AWS SO somewhere. But yes you’re on the right track, you’d most likely look under EC2 for “instances” If there’s only one instance, your life will be easier. Find the ip address bound to the instance in question. I would have to guess that both: FTP is not … Read more
Try logging into the mysql instance from the command line by typing in mysql -u root -p and then entering your mysql root password. If you can connect, even if it rejects your username and password, you know it’s up and running correctly. From that point you can diagnose whether it is username/password issues or … Read more
Install Amazon Web Services Plugin. (https://wordpress.org/plugins/amazon-web-services/) Add all the required keys, at the AWS menu that now should be available in your WP dashboard. Include the library in your code, in my case was: require ‘/path/to/plugins/amazon-web-services/vendor/aws/aws-autoloader.php’; Enjoy!
Try to save jQuery.noConflict(); as jquery-no-conflict.js. Then enqueue everything with proper dependencies: <?php function img_scripts_with_jquery() { wp_enqueue_script( ‘jquery-no-conflict’, ‘path/to/jquery-no-conflict.js’, array( ‘jquery’ ), ‘version’, true ); wp_enqueue_script( ‘aws-cba’, ‘https://images-na.ssl-images-amazon.com/images/G/01/cba/js/common/cba_shared.js’, array( ‘jquery-no-conflict’ ), ‘version’, true ); wp_enqueue_script( ‘aws-merchant-cart’, ‘https://images-na.ssl-images-amazon.com/images/G/01/cba/js/shoppingcart/merchant_cart.js’, array( ‘jquery-no-conflict’ ), ‘version’, true ); } add_action( ‘wp_enqueue_scripts’, ‘img_scripts_with_jquery’ );
Why would you want to protect them all? Not all of them need protecting, in my humble opinion. In any event, these are good to have in your .htaccess file: 1: restrict access to wp-config.php <Files wp-config.php> order allow, deny deny from all </Files> 2: restrict access to .htaccess itself <Files .htaccess> order allow,deny deny … Read more
There are two modes email can be sent with the plugin: simple emails are sent through STS; email with anything that STS doesn’t support (custom headers, attachments, etc) are sent through fallback function, that is simply copy of native wp_mail() function. For former plugin doesn’t set from name at all. For latter it default to … Read more
Yes. Cloudfront is just a caching proxy to your content not different from any other cache on the internet. AFAICT If you set up your cache headers properly it will cache automatically your content. The difficult part in caching is to know what not to cache and to invalidate the cache when there was a … Read more
The problem: The problem seems to be that wp_check_filetype() doesn’t recognize mp3 files with GET parameters. Possible workarounds: You have two options as far as I can see: 1) Override the audio shortcode with the wp_audio_shortcode_override filter. 2) or allow any audio extensions via the wp_audio_extensions filter. Here’s an example how you can implement the … Read more