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
-
Having issues crawling a website
We looked to use the Screaming Frog Tool to crawl this website and get a list of all meta-titles from the site, however, it only resulted with the one result - the homepage. We then sought to obtain a list of the URLs of the site by creating a sitemap using https://www.xml-sitemaps.com/. Once again however, we just go the one result - the homepage. There is something that seems to be restricting these tools from crawling all pages. If you anyone can shed some light as to what this could be, we'd be most appreciative.
Intermediate & Advanced SEO | | Gavo0 -
How to add dropdown menus in the Wordpress Cutline theme?
I've got a fan website for a cult US TV show (that also sells merchandise as an affiliate). The site's design is about five years old, and I should probably revamp it at some point: http://www.btvsonline.com/ Anyway, the site's Cutline theme (http://cutline.tubetorial.com/) does not support native headers, and the header menu shows only a text list of my top-level pages. There are many subpages below these pages, but it's hard for users to find them without going to different pages to try to find things. What I'm looking for: if someone hovers above "Store" in the menu, a dropdown menu showing all the product pages would appear. I've tried to find Wordpress plugins or PHP hacks to add dropdown menus and I have gone through Cutline's support site, but I have had no luck. Anyone in the Moz community have any advice? Perhaps I just need to revamp the site with a new and modern Wordpress theme? Thanks in advance for any thoughts!
Intermediate & Advanced SEO | | SamuelScott0 -
Is Sitemap Issue Causing Duplicate Content & Unindexed Pages on Google?
On July 10th my site was migrated from Drupal to Google. The site contains approximately 400 pages. 301 permanent redirects were used. The site contains maybe 50 pages of new content. Many of the new pages have not been indexed and many pages show as duplicate content. Is it possible that there is a site map issue that is causing this problem? My developer believes the map is formatted correctly, but I am not convinced. The sitemap address is http://www.nyc-officespace-leader.com/page-sitemap.xml [^] I am completely non technical so if anyone could take a brief look I would appreciate it immensely. Thanks,
Intermediate & Advanced SEO | | Kingalan1
Alan | |0 -
Category Base in Wordpress
I notice that there is a checkbox on the Yoast SEO Plugin for "strip category base". What is the reason to do this? What are the SEO advantages and disadvantages?
Intermediate & Advanced SEO | | casper4340 -
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 -
Strange issue with video search results...
Hi all, Got a bit of a weird problem that I can't work out. I've got a page that contains a video. The SERP for one keyword has the video appearing directly in the search listing like a video rich snippet / schema. Do not want. This rich snippet style video result only appears when the page is found for this one keyword, and no other. How do I stop google displaying the page like this? Why is it only displayed like this for one keyword and no others? The video is a YouTube video and is embedded in the page. Nothing fancy is going on with the code. Any ideas? I'm stumped.
Intermediate & Advanced SEO | | WillQ0 -
Better to optimize page, post or category in WordPress
Hello, This question is for the WordPress experts out there. I've always wondered if it is better for SEO to focus on a particular keyword by writing a page or a post dedicated to it. For example, if I want to rank high for the keyword "Seattle rocks", do you think I'd be better off writing a page titled "Seattle rocks" or a post titled "Seattle rocks". The ideal for me would be to create a category with the URL that includes that keyword for my WordPress blog, but I do not know if I can do a good job in terms of SEO optimizing the keyword. For instance, if we consider the keyword in the example above, I'd create a category which will have the following URL: http://www.seomozthebest.com/category/seattle-rocks Do you think I can still focus on that keyword having such URL? As you know, WordPress would allow me to write some text in the description tag, which will be visible on the site. I guess that I could use the description box to create some optimized content using the keyword "Seattle rocks" and then launch a link building campaign using the anchor text "Seattle rocks" directing to the URL: http://www.seomozthebest.com/category/seattle-rocks Do you think that I can optimize the keyword by creating a category? Thank you for reading such long question. I tried to be as clear as possible. Sal
Intermediate & Advanced SEO | | salvyy0 -
How to fix issues regarding URL parameters?
Today, I was reading help article for URL parameters by Google. http://www.google.com/support/webmasters/bin/answer.py?answer=1235687 I come to know that, Google is giving value to URLs which ave parameters that change or determine the content of a page. There are too many pages in my website with similar value for Name, Price and Number of product. But, I have restricted all pages by Robots.txt with following syntax. URLs:
Intermediate & Advanced SEO | | CommercePundit
http://www.vistastores.com/table-lamps?dir=asc&order=name
http://www.vistastores.com/table-lamps?dir=asc&order=price
http://www.vistastores.com/table-lamps?limit=100 Syntax in Robots.txt
Disallow: /?dir=
Disallow: /?p=
Disallow: /*?limit= Now, I am confuse. Which is best solution to get maximum benefits in SEO?0