Change the directory of images uploaded in wordpress to one outside the directory

0

I am commenting on a project which I am using laravel and wordpress, and I need that the images that are uploaded from wordpress, are in a folder outside the project of the wordpress folder, that is, I need it to be in a folder in " public ", since I am using wordpress for a blog system for my application in Laravel, and I need no reference in the url about where this wordpress is (Security reasons), since the content of the posts are brought from Corcel .

That is:

  • Public (Parent Directory)
  • Wordpress project directory (Child Directory)
  • img_blog (Child Directory)

I need the images that are saved in the "Wordpress project directory", change the directory to "img_blog".

I've been stuck for a while and I can not ... Thanks ^^

    
asked by Farok-Art 06.10.2018 в 13:46
source

1 answer

0

Try this method. Edit your wp-config.php file adding this code at the end:

   define('UPLOADS', 'wp-content/myimages');

Being 'wp-content / myimages' the new directory, that is, if you need it outside of the Wordpress folder it would put: ' ../ the-folder-what-you-want- put '

IMPORTANT !!!

Make sure you write it before:

   require_once(ABSPATH.'wp-settings.php');
    
answered by 08.10.2018 в 11:33