WordPress and Paths

I am setting up a WordPress site for educational purposes.. the content that I want to show in the wordpress blogs (videos) does however not reside in the wp-content directory but in the Root directory of the server of which WordPress is a Subdirectory on the same server

Server root

Read More

-root

–worpress <– wordpress

–content <– my video content going many levels deep

in my Posts i do not want to use the ip address but rather a function that is written into my WordPress functions where i can once define the server ip address of this server before hand and call it in every post and page !

So.. how/where do i define the ip address and how do i call it in my wordpress post to make mediaelement.js media player find the video file?

Any suggestions appreciated

Related posts

Leave a Reply

1 comment

  1. A simpler way may be to just use symlinks. So say the media player expects the files to be at wp-content/videos directory, but you want the videos to be placed in /var/www/videos directory. You can create a symlink to this videos directory inside the wp-content directory.

    ln -s /path/to/wp-content/videos /var/www/videos
    

    Depending on configuration, You may also need to add FollowSymLinks to your .htaccess file to allow symlinks.

    Edit: Post clarification

    You can move the wp-content directory to outside the WordPress directory, by modifying your wp-config.php.

    define('WP_CONTENT_DIR', '/path/to/content');
    

    To move just the plugins directory,

    define('WP_PLUGIN_DIR', '/path/to/plugins');
    

    To move the directory where uploads are stored,

    define('UPLOADS', '/path/to/uploads');