Is it possible to add files to the "Wordpress Media Library" using the command line?

Posted by Tom on Server Fault See other posts from Server Fault or by Tom
Published on 2010-03-05T10:56:08Z Indexed on 2010/03/21 14:41 UTC
Read the original article Hit count: 354

Filed under:
|
|

Wordpress has it's own "Media Library" which is used when you upload images and other media for use in blog posts and pages. The advantage of the media library is that it automatically produces thumbnails of the images and the web interface gives you extra info such as who uploaded the image, which articles use the image, etc.

My question is, does anyone have any tips on interacting with the media library via the command line instead of using the Wordpress web interface?

For example, any ideas on how to add a image to the media library from the command line?

If I copy files to the media library directory (usually .../wp-content/uploads/YYYY/MM/) from the command line they do not show up in the Wordpress dashboard - I guess because there needs to be an associated database entry for the media to be registered with Wordpress.

© Server Fault or respective owner

Related posts about Wordpress

Related posts about command-line