• In order to optimize my website, I have converted all my images to webp format and stored in a separate folder structure for easy navigation.
    The problem that I am facing is-
    When I try to change the root media folder in order to show the images in dashboard media section, the site crashes.
    Can someone please guide me on how I can maintain a different folder structure + make all the media visible in media section of dashboard and on editor so that I can add those images to my website.
    I am Colibri page builder.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter himanshu5898

    (@himanshu5898)

    Hi @spiraltee , I made the changes suggested in the above article.
    When I add the code above line ‘/* That’s all, stop editing! Happy publishing. */’ in wp-config file, the website is crashing.
    When I add the code below line ‘/** Sets up WordPress vars and included files. */’ in wp-config file, the website does not crash but neither am I able to see images in dashboard media section.
    Is there any specific section or line after or before which I need to add the code in wp-config file?
    Or is it some different issue.

    Line of code added by me- define( ‘UPLOADS’, ‘wp-content/’.’images’ );

    • This reply was modified 2 years, 6 months ago by himanshu5898.

    Hi @himanshu5898, I tried reproducing this locally on WordPress 5.8.1 and putting the piece of code at either locations didn’t result in any crashes. Can you share the error message displayed when the website ‘crashes’?

    You also want to check your WordPress directory to be sure that the ‘images’ folder exists inside your ‘wp-content’ folder.

    After adding the code below line ‘/** Sets up WordPress vars and included files. */’, please try to upload an image to your media library via by clicking on the “Add New” button not via FTP and see if it shows up, if it does then the folder has been changed, you can also confirm this by checking the image path of the thumbnail displayed in the Media Library.

    However files just copied into the ‘images’ folder won’t show up in your Media Library, see this article – https://www.webnots.com/fix-wordpress-media-library-not-showing-images-uploaded-with-ftp/

    I’m not sure how you converted your images to webp format but you can take a look at how this plugin works https://wordpress.org/plugins/webp-converter-for-media/

    Thread Starter himanshu5898

    (@himanshu5898)

    Warning: array_replace_recursive(): Expected parameter 2 to be an array, string given in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php on line 213

    Warning: array_replace_recursive(): Expected parameter 2 to be an array, string given in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php on line 213

    Warning: array_replace_recursive(): Expected parameter 2 to be an array, string given in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php on line 213

    Warning: array_replace_recursive(): Expected parameter 2 to be an array, string given in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php on line 213

    Warning: array_replace_recursive(): Expected parameter 2 to be an array, string given in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php on line 213

    Warning: array_replace_recursive(): Expected parameter 2 to be an array, null given in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php on line 213

    Fatal error: Uncaught TypeError: Argument 1 passed to ExtendBuilder\array_get_value() must be of the type array, null given, called in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php on line 216 and defined in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/utils.php:71 Stack trace: #0 /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php(216): ExtendBuilder\array_get_value(NULL, ‘colors’, Array) #1 /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/data/theme-data.php(224): ExtendBuilder\get_theme_data(‘colors’, true, Array) #2 /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/gutenberg.php(6): ExtendBuilder\get_current_theme_data(‘colors’, Array) #3 /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-in in /home3/zgnqfgmy/public_html/dev-assertion-co-in/wp-content/plugins/colibri-page-builder-pro/extend-builder/utils.php on line 71

    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    Learn more about troubleshooting WordPress.

    Last three lines was the actual error message popping up. The above logs I got when I used debug bar plugin

    Hi there, when did this pop up? Did you get this after adding the code to your wp-config?

    Thread Starter himanshu5898

    (@himanshu5898)

    Yes after adding code above line ‘/* That’s all, stop editing! Happy publishing. */’.
    and
    When I add the code below line ‘/** Sets up WordPress vars and included files. */’ in wp-config file, the website does not crash but neither am I able to see images in dashboard media section.

    Alright, can you add the code below the line ‘/** Sets up WordPress vars and included files. */’. Then try to upload an image to the Media Library and see if it works.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changing media library path.’ is closed to new replies.