The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Wordpress uploads folder issues

    Wordpress uploads folder issues

    Intermediate & Advanced SEO
    8 3 709
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Taiger
      Taiger last edited by

      Hi, i have recently moved my wordpress blog to a new server..

      Previously I had a url as website.com/blog

      My blog site is now running on the domain website.com

      Now most of my images are in the correct folder path wp-content/uploads

      Howerver, some of my images are pointing to a folder /blog/wp-content/uploads and so I am getting many missing image on the front end.

      How do i get the /blog/wp-content/uploads point to the new url wp-content/uploads

      Thanks guys..

      Taiger

      1 Reply Last reply Reply Quote 0
      • BlueprintMarketing
        BlueprintMarketing last edited by

          Go to permlinks first and see if reseting your permana links by simply selecting new URL structure and hitting the save button works.
         if not
        

        Change Default Media Folder

        Open your wp-config.php file, locoed at the root of your WordPress installation, and add the following snippet:

        | ```
        1

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

        
        Make sure you add this code before the line:
        
        | ```
        1
        
        ``` | ```
        require_once(ABSPATH.’wp-settings.php’);
        ``` |
        
        This Yoast article is very Helpful along with the tool below
        
        https://yoast.com/change-wordpress-permalink-structure/
        
        https://yoast.com/wp-content/permalink-helper.php
        
        OR
        
        Then he default uploads folder needs to be changed to a different location, then any media URLs will need to be changed in the**post_content** column of the posts table. For example, if the default uploads folder is changing from **wp-content/uploads** to **images**:
        
        

        UPDATE wp_posts SET post_content = REPLACE(post_content,'www.domain.com/wp-content/uploads','www.domain.com/images');

        
        Aso see
        http://www.wpbeginner.com/wp-tutorials/how-to-change-the-default-media-upload-location-in-wordpress-3-5/
        ```
        
        http://premium.wpmudev.org/blog/change-default-wordpress-uploads-folder/
        
        ### wp-cli
        
        [wp-cli](http://wp-cli.org/) is a super useful shell tool.
        
        ```
        wp search-replace '[http://example.dev'](http://example.dev%27/) '[http://example.com'](http://example.com%27/) --skip-columns=guid
        ```
        
         Hope that helps,
        
        Tom
        
        [KbfucDJ.png](http://i.imgur.com/KbfucDJ.png)
        Taiger 1 Reply Last reply Reply Quote 0
        • Taiger
          Taiger @BlueprintMarketing last edited by

          Hi Tom, Thank you so much for your help. Just need to be clear on one thing.. Most of the images are pointing to the correct uploads folder.

          And some are pointing to /blog/wp-content/uploads folder.

          ps. the permalinks settings have been set up.

          pps. Your suggestions do look a bit complicated.. (i may need to get some to look at implementing it)

          BlueprintMarketing 1 Reply Last reply Reply Quote 0
          • BlueprintMarketing
            BlueprintMarketing @Taiger last edited by

            Hi

            I would be happy to help  do you have the ability to post a screenshot of your WP config file?

            Here is a redirect that may make a difference.

            Add the following redirect to the the top of your .htaccess file:

            RedirectMatch 301 ^/http://domain.com/blog/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://domain.com/http://domain.com/blog/$4
            

            It sounds like you have it set up correctly and not have all the photos uploaded to the new folder. If that is the issue and you have a backup of the site could simply upload from your image folder if that that possible?

            If you it done for you I recommend authoritydev.com & gregreindel.com

            Is one of the best WordPress developers I know.

            Feel free to contact me as well  contact@blueprintmarketing.com

            sincerely,

            Thomas

            1 Reply Last reply Reply Quote 0
            • BlueprintMarketing
              BlueprintMarketing last edited by

              If you are uncomfortable changing the settings my suggestion companies like Pagely.com $64 3 sites wpengine.com $29 a site and getflywheel.com $15 a site.

              They will migrate your website for free they will also support any of these issues you may want to look into them. You can also save money by going to Moz.com/Perks on Pagely & WP engine

              #1) Please backup the entire site

              **using something like ValtPress.com (easy setup http://help.vaultpress.com/install-vaultpress/ ) , sucuri.net/website-backups or codeguard.com (it's a lifesaver and everyone should use off-site backups) **

              #2) If you still have your old WP install backed up I would make it your live again and export the images then reimport them usining WordPress import & export

              This tool is amazing if you want to bring over the content from a site that you can still access

              https://wordpress.org/plugins/easy-site-importer/

              **#3) **wp-config

              This might simplify it bit-this is what you're looking for as a tool that really makes it easy to change the WP config file

              https://generatewp.com/wp-config/

              Then go to "address" you can see underlined in this photograph is larger image

              http://i.imgur.com/WagtM8N.png

              Compare your WP config file to in the generated config file if the only discrepancy is /blog  configure it to your set up.

              If you need more you must migrate.

              See https://wordpress.org/plugins/tags/migrate

              http://www.wpallimport.com can inmport everything

              using a tool like this will allow you to keep off-site backups on AWS S3 a fast and secure place to store files.

              https://wordpress.org/plugins/database-backup-amazon-s3/installation/

              https://wordpress.org/plugins/wp-staging/

              https://wordpress.org/plugins/site-import/

              http://www.wpadm.com/

              I hope this helps,

              Tom

              WagtM8N.png

              1 Reply Last reply Reply Quote 0
              • MattRoney
                MattRoney last edited by

                Hey Taiger! Get this worked out? 🙂

                1 Reply Last reply Reply Quote 2
                • Taiger
                  Taiger last edited by

                  Yes thanks all sorted.

                  Tai

                  BlueprintMarketing 1 Reply Last reply Reply Quote 2
                  • BlueprintMarketing
                    BlueprintMarketing @Taiger last edited by

                    Hi Tai,

                    Glad to hear that this is all sorted out.

                    All the best,

                    Tom

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    • Site structure: Any issues with 404'd parent folders?
                      willcritchlow
                      willcritchlow
                      0
                      12
                      170

                    • Potential Pagination Issue/ Duplicate content issue
                      PeteC12
                      PeteC12
                      0
                      4
                      79

                    • Wordpress to HubSpot CMS - I had major crawl issues post launch and now traffic is down 400%
                      cmortensen
                      cmortensen
                      0
                      3
                      793

                    • Using WP All Import csv import plugin for wordpress to daily update products on large ecommerce site. Category naming and other issues.
                      weebro
                      weebro
                      0
                      4
                      4.4k

                    • If I had an issue with a friendly URL module and I lost all my rankings. Will they return now that issue is resolved next time I'm crawled by google?
                      Pete79
                      Pete79
                      0
                      3
                      226

                    • Rel canonical issues on wordpress posts
                      Dr-Pete
                      Dr-Pete
                      0
                      3
                      436

                    • Duplicate WordPress Home Page Issue
                      National-Positions
                      National-Positions
                      0
                      5
                      613

                    • How to Disallow Specific Folders and Sub Folders for Crawling?
                      RyanKent
                      RyanKent
                      0
                      14
                      1.5k

                    Get started with Moz Pro!

                    Unlock the power of advanced SEO tools and data-driven insights.

                    Start my free trial
                    Products
                    • Moz Pro
                    • Moz Local
                    • Moz API
                    • Moz Data
                    • STAT
                    • Product Updates
                    Moz Solutions
                    • SMB Solutions
                    • Agency Solutions
                    • Enterprise Solutions
                    • Digital Marketers
                    Free SEO Tools
                    • Domain Authority Checker
                    • Link Explorer
                    • Keyword Explorer
                    • Competitive Research
                    • Brand Authority Checker
                    • Local Citation Checker
                    • MozBar Extension
                    • MozCast
                    Resources
                    • Blog
                    • SEO Learning Center
                    • Help Hub
                    • Beginner's Guide to SEO
                    • How-to Guides
                    • Moz Academy
                    • API Docs
                    About Moz
                    • About
                    • Team
                    • Careers
                    • Contact
                    Why Moz
                    • Case Studies
                    • Testimonials
                    Get Involved
                    • Become an Affiliate
                    • MozCon
                    • Webinars
                    • Practical Marketer Series
                    • MozPod
                    Connect with us

                    Contact the Help team

                    Join our newsletter
                    Moz logo
                    © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                    • Accessibility
                    • Terms of Use
                    • Privacy