Wordpress uploads folder issues
-
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
-
Hi Tai,
Glad to hear that this is all sorted out.
All the best,
Tom
-
Yes thanks all sorted.
Tai
-
Hey Taiger! Get this worked out?
-
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/
I hope this helps,
Tom
-
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
-
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)
-
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)
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Possible duplicate content issues on same page with urls to multiple tabs?
Hello everyone! I'm first time here, and glad to be part of Moz community! Jumping right into the question I have. For a type of pages we have on our website, there are multiple tabs on each page. To give an example, let's say a page is for the information about a place called "Ladakh". Now the various urls that the page is accessible from, can take the form of: mywanderlust.in/place/ladakh/ mywanderlust.in/place/ladakh/photos/ mywanderlust.in/place/ladakh/places-to-visit/ and so on. To keep the UX smooth when the user switches from one tab to another, we load everything in advance with AJAX but it remains hidden till the user switches to the required tab. Now since the content is actually there in the html, does Google count it as duplicate content? I'm afraid this might be the case as when I Google for a text that's visible only on one of the tabs, I still see all tabs in Google results. I also see internal links on GSC to say a page mywanderlust.in/questions which is only supposed to be linked from one tab, but GSC telling internal links to this page (mywanderlust.in/questions) from all those 3 tabs. Also, Moz Pro crawl reports informed me about duplicate content issues, although surprisingly it says the issue exists only on a small fraction of our indexable pages. Is it hurting our SEO? Any suggestions on how we could handle the url structure better to make it optimal for indexing. FWIW, we're using a fully responsive design with the displayed content being exactly same for both desktop and mobile web. Thanks a ton in advance!
Intermediate & Advanced SEO | | atulgoyal0 -
Is there a way to no index no follow sections on a page to avoid duplicative text issues?
I'm working on an event-related site where every blog post starts with an introductory header about the event and then a Call To Action at the end which gives info about the Registration Deadline. I'm wondering if there is something we can and should do to avoid duplicative content penalties. Should these go in a widget or is there some way to No Index, No Follow a section of text? Thanks!
Intermediate & Advanced SEO | | Spiral_Marketing0 -
Google update this wknd or page title issue?
Hi, I've seen a big ranking drop for many major terms, for a particular site, just on Google. This happened Fri 20th or Sat 21st just gone. I don't see any news on an algorithm update over the weekend.I had changed many of the sites major page title protocols 2 weeks ago but a) I would have expected any negative effect before now and not all at once b) the protocols were carefully crafted to avoid traffic drops for major terms and c) i'm seeing traffic drops for keywords that still start at the beginning of the page title d) im seeing drops for some pages which are still using the OLD page titles. I had even tested the protocol on a number of pages in advance to ensure it wouldn't cause problems. As a bit of background - the title protocols were changed to make them more user friendly and less keyword heavy. CTR from search improved so was hoping for better not worse rankings! Ideas, gratefully appreciated.Andy
Intermediate & Advanced SEO | | AndyMacLean0 -
Duplicate content issue with pages that have navigation
We have a large consumer website with several sections that have navigation of several pages. How would I prevent the pages from getting duplicate content errors and how best would I handle SEO for these? For example we have about 500 events with 20 events showing on each page. What is the best way to prevent all the subsequent navigation pages from getting a duplicate content and duplicate title error?
Intermediate & Advanced SEO | | roundbrix0 -
Duplicate page wordpress title
Hi Moz Fan, I have a few question that confuse by now, According to my website used wordpress for create a blog.
Intermediate & Advanced SEO | | ASKHANUMANTHAILAND
but now i have got duplicate page title from wordpress blog and very weird because these duplicate
page title look like these term Lamborghini ASK Hanuman Club < title that was duplicate but they duplicate with the page like this
articles/13-วิธีง่ายๆ-เป็น-คนรวย-ได้/lamborghini-2/ , /articles/13-วิธีง่ายๆ-เป็น-คนรวย-ได้/lamborghini/ I don't know why Worpress create a new page that only have 1 pics, So I think that might be the effect
from Wordpress PHP Code Or wrong setting. Can anyone suggestion what should we do for these issues ?
because i have many duplicate page title from this case.1 -
REL canonicals not fixing duplicate issue
I have a ton of querystrings in one of the apps on my site as well as pagination - both of which caused a lot of Duplicate errors on my site. I added rel canonicals as a php condition so every time a specific string (which only exists in these pages) occurs. The rel canonical notification shows up in my campaign now, but all of the duplicate errors are still there. Did I do it right and just need to ignore the duplicate errors? Is there further action to be taken? Thanks!
Intermediate & Advanced SEO | | Ocularis0 -
Google Cache Redirection Issue? Or awaiting DNS Propagation?
We have just launched an Australian version of our .com site. The domain example.com.au used to redirect automatically to example.com. We updated the DNS to point to our new Australian site on 13 August and have started a two week soft launch to iron out issues and allow us to start the indexing process. The issue is, when I'm checking to see if we have been crawled yet, if I do I search for: cache:http://www.example.com.au The cache automatically redirects to http://www.example.com and shows the cache for that site. The date on the cache is: 14 Aug 2012 20:47:34 GMT. My question is, have I missed something during this process or are we just waiting for the DNS change to fully propagate?
Intermediate & Advanced SEO | | Benj250 -
Wordpress Duplicate Content Due To Allocating Two Post Categories
It looks like google has done a pretty deep crawl of my site and is now showing around 40 duplicate content issues for posts that I have tagged in two seperate categories for example: http://www.musicliveuk.com/latest-news/live-music-boosts-australian-economy http://www.musicliveuk.com/live-music/live-music-boosts-australian-economy I use the all in one SEO pack and have checked the no index for categories, archive, and tag archive boxes so google shouldn't even crawl this content should it? . I guess the obvious answer is to only put each post in one category but I shouldn't have to should I? Some posts are relevant in more than once category.
Intermediate & Advanced SEO | | SamCUK0