The safest way to automate WordPress backups

(Partial answer as I’m familiar with AWS, not Google Drive.) Having a WordPress DB stored somewhere on a cloud service is, in my opinion, no worse that hosting the site on a virtual or cloud server (given virtualisation platforms all allow you to reset the server’s root password – albeit typically with a reboot – … Read more

Add shortcode support to custom field

@see https://codex.wordpress.org/Function_Reference/do_shortcode Searches content for shortcodes and filters shortcodes through their hooks: echo do_shortcode( get_post_meta( THE_ID_OF_YOUR_POST, THE_NAME_OF_YOUR_CUSTOM_FIELD, true ) );

Replace text in post from cvs

Best thing to do is to write your own CSV import php file. By using functions like wp_insert_post() you can insert the data from the csv file as a new post in the wordpress database. If you’re not a coder, which I’m sensing, you can try this plugin: https://wordpress.org/plugins/wp-ultimate-csv-importer/. The free function offers everything you’re … Read more

Can’t update/install plugins or WordPress

Fixed it. Put in a few commands that helped give wordpress the permissions it needed to auto update: sudo usermod -aG www-data $USER sudo chown -R www-data:www-data /var/www sudo chmod -R 774 /var/www This problem has been plaguing me for months. I feel like a huge weight has been lifted off my chest now haha.

How do I create a custom add media button modal?

You can inspire from this tutorial here: http://www.sitepoint.com/adding-a-media-button-to-the-content-editor/ For videos you can change the library type to ‘video’: function open_media_window() { var window = wp.media({ title: ‘Insert a media’, library: {type: ‘video’}, multiple: false, button: {text: ‘Insert’} }); } Hope this helps.

Load custom PHP on a custom URL via a plugin

Use is_page(). The is_page() function accepts page title, slug or id. Documentation <?php if(is_page(‘myscript’)) { include ‘/path/to/myscript.php’; } ?> UPDATE To add it to the content, you have two options 1. Find the content function in your template Find either the_content() or get_the_content() in your template. Place it immediately after that function (or before if … Read more