• Hello, I am using a custom upload directory configured in wp-config.php via define('UPLOADS', 'data');. However, after activating WooCommerce, all paths in WordPress are overwritten to the default wp-content/uploads directory. I looked to see if this path is defined again in WooCommerce but couldn’t find it. Can you help me, please? Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Stef

    (@serafinnyc)

    Hello @jand1 can you send over a screenshot of how you did this? I’d like to see how you defined that.

    Thanks

    Thread Starter jand1

    (@jand1)

    sure, this is the part of config under keys and salts:

    /**#@-*/
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each
     * a unique prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix  = 'wp_';
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     *
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     *
     * @link https://codex.www.ads-software.com/Debugging_in_WordPress
     */
    //define( 'WP_DEBUG', true );
    //define( 'WP_DEBUG_DISPLAY', false );
    //define( 'WP_DEBUG_LOG', '/logs/wp-log.log' );
    define( 'WP_POST_REVISIONS', true );
    /* That's all, stop editing! Happy blogging. */
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    define('UPLOADS', 'data');

    without Woocommerce it works for many years, but maybe its not defined correctly, thanks!

    Stef

    (@serafinnyc)

    Go now and change the setting for

    //define( 'WP_DEBUG', true );

    to

    //define( 'WP_DEBUG', false ); // set to false
    Thread Starter jand1

    (@jand1)

    All three lines concerning the logs are now commented out…

    Stef

    (@serafinnyc)

    No clear your server cache and your browser cache and you should be good to go.

    Hi @jand1,

    I understand your concern regarding the custom upload directory. WooCommerce uses the WordPress media settings as it’s default for uploads, and it doesn’t define its own path.?

    As you had defined a custom upload directory, this then terms the request as a customization request, which is out of our support scope.

    With that said, I’ll leave the thread open for a while as you continue getting assistance from community members.

    All the best.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WooCommerce is overwriting the upload directory’ is closed to new replies.