WordPress Plugin developer guide

Last updated: Aug-03-2022

If you're an experienced WordPress developer and are looking to customize and extend the Cloudinary WordPress plugin, you can make use of some additional tools and options to get the best out of your setup.

Setting the connection string as a constant

One way you might want to configure the plugin is to define your Cloudinary connection string as a constant. Setting the constant will prevent any users from editing or updating the associated Cloudinary cloud via the WordPress UI. To set your connection string, add the following line to your wp-config.php file, replacing the key, secret and cloudname with your own values:

Copy to clipboard
define( 'CLOUDINARY_CONNECTION_STRING', 'cloudinary://key:secret@cloudname' );

Actions and filters

The Cloudinary WordPress plugin exposes a number of actions and filters that you can hook into to customize and extend the functionality of the plugin. You can find a full reference of the available options here.

WP-CLI

The WP-CLI can be used to perform a number of tasks on your WordPress site using the command line. The Cloudinary plugin extends this capability by adding two additional CLI commands:

  • The analyze command analyzes the current state of your media assets, telling you how many assets you have that are "synced", "unsynced" or "unsupported".

    Copy to clipboard
    wp cloudinary analyze
  • The sync command will begin syncing any unsynced assets to Cloudinary. You can use this as an alternative method for syncing your assets in bulk.

    Copy to clipboard
    wp cloudinary sync

Related topics


Guide to Building the Ultimate E-Commerce Website

 
You may also want to take a look at Cloudinary's five-chapter Guide to Building the Ultimate E-Commerce Website. The guide includes suggestions by e-commerce and technical experts on how to build a versatile marketplace by selecting automated e-commerce and CMS platforms that help you create, modify, and deploy adaptable user experiences.

✔️ Feedback sent!

Rate this page: