<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									How to modify the location of wpDiscuz attachments. - Frequently Asked Questions				            </title>
            <link>https://wpdiscuz.com/community/f-a-q/how-to-modify-the-location-of-wpdiscuz-attachments/</link>
            <description>wpDiscuz WordPress Comment Plugin Community. Support and Resources.</description>
            <language>en-US</language>
            <lastBuildDate>Tue, 21 Apr 2026 10:21:06 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>How to modify the location of wpDiscuz attachments.</title>
                        <link>https://wpdiscuz.com/community/f-a-q/how-to-modify-the-location-of-wpdiscuz-attachments/#post-25208</link>
                        <pubDate>Fri, 09 Aug 2024 09:55:43 +0000</pubDate>
                        <description><![CDATA[Starting from wpDiscuz version 7.6.20, you can modify the location of wpDiscuz attachments using the wpdiscuz_uploads_folder hook. 
The code snippet below allows you to create a new folder ...]]></description>
                        <content:encoded><![CDATA[<p>Starting from wpDiscuz version 7.6.20, you can modify the location of wpDiscuz attachments using the <a href="https://wpdiscuz.com/docs/codex/filters/wpdiscuz_uploads_folder/" target="_blank" rel="noopener">wpdiscuz_uploads_folder</a> hook. </p>
<p>The code snippet below allows you to create a new folder within the '<em><strong>/uploads'</strong></em> directory, where all wpDiscuz attachments will be stored:</p>
<div class="entry-content">
<div class="doc-field-usage">
<pre contenteditable="false">add_filter("wpdiscuz_uploads_folder", function ($dir) {
    $dir  = "wpdiscuz_uploads";
    return $dir;
});
</pre>
<p>Insert this hook code into the functions.php file of your active WordPress theme. For more information on how to add custom code, refer to this guide: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/</p>
<p><span style="color: #ff6600"><em>Important: This code will only affect new attachments. Previously inserted images will not display on the frontend because the path has already changed. To resolve this issue, you'll need to update the existing attachment paths in the database.</em></span></p>
<p><strong>We strongly recommend backing up your database tables before making any changes</strong>.</p>
<p>If you’re not familiar with database structure and are unable to change the paths yourself, we recommend contacting paid plugin customization and custom addon development services through the gVectors Team. They can assess the work and create the necessary changes for you. Just contact us via salesgvectors.com email address and send a list of requirements you'd like to have.</p>
</div>
</div>]]></content:encoded>
						                            <category domain="https://wpdiscuz.com/community/f-a-q/">Frequently Asked Questions</category>                        <dc:creator>Asti</dc:creator>
                        <guid isPermaLink="true">https://wpdiscuz.com/community/f-a-q/how-to-modify-the-location-of-wpdiscuz-attachments/#post-25208</guid>
                    </item>
							        </channel>
        </rss>
		