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
-
Manage category pages and duplicate content issues
Hi everybody, I am now auditing this website www.disfracessimon.com
Intermediate & Advanced SEO | | teconsite
this website has some issues with canonicals and other things. But right now I have found something that I would like to know your opinion. When I was checking parts of the content in google to find duplicate content issues I found this: I google I searched: "Chaleco de streck decorado con botones" and found First result: "Hombre trovador" is the one I was checking -> Correct
The following results are category pages where the product is listed in. I was wondering if this could cause any problem related with duplicated content. Should I no index category pages or should I keep it?
The first result in google was the product page. And category pages I think are good for link juice transfer and to capture some searchs from Google. Any advice? Thank you0 -
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 -
Strange Cross Domain Canonical Issue...
We have 2 identical ecommerce sites. Using 301 is not an option since both are major brands. We've been testing cross domain canonicals for about 2 dozen products, which were pretty successful. Our rankings generally increased. Then things got weird. For the most part, canonicaled pages appeared to have passed link juice since the rankings significantly improved on the other site. The clean URLs (www.domain.com/product-name/sku.cfm) disappeared from the rankings, as they are supposed to, but some were replaced by urls with parameters that Google had indexed (apparently duplicate content). ex: (www.domain.com/product-name/sku.cfm?clicksource?3diaftv). The parametered URLs have the correct canonical tags. In order to try and remove these from Google's index, we: 1. Had the pages fetched in GWT assuming that Google hadn't detected the canonical tage. 2. After we discovered a few hundred of these pages indexed on both sites, we built sitemaps of the offending pages and had the sitemaps fetched. If anyone has any other ideas, please share.
Intermediate & Advanced SEO | | AMHC0 -
Using folder blocked by robots.txt before uploaded to indexed folder - is that OK?
I have a folder "testing" within my domain which is a folder added to the robots.txt. My web developers use that folder "testing" when we are creating new content before uploading to an indexed folder. So the content is uploaded to the "testing" folder at first (which is blocked by robots.txt) and later uploaded to an indexed folder, yet permanently keeping the content in the "testing" folder. Actually, my entire website's content is located within the "testing" - so same URL structure for all pages as indexed pages, except it starts with the "testing/" folder. Question: even though the "testing" folder will not be indexed by search engines, is there a chance search engines notice that the content is at first uploaded to the "testing" folder and therefore the indexed folder is not guaranteed to get the content credit, since search engines see the content in the "testing" folder, despite the "testing" folder being blocked by robots.txt? Would it be better that I password protecting this "testing" folder? Thx
Intermediate & Advanced SEO | | khi50 -
Questions Regarding Wordpress Blog Format, Categories and Tag pages...
I'm looking to make some optimizations to a website I'm working on but wanted more input before I get started: Currently, when blogs are posted to the website, the URL for each post looks like this:www.mywebsite.com/blogpost I've heard that for whatever reason, the best practice is to make sure that the blog posts get posted to a blog sub-directory like so: www.mywebsite.com/blog/blogpost If I were to make this change, I'm assuming I would have to 301 redirect all of the existing blogs to their new locations. Is this change worth doing and are there any other considerations I should be taking into account? Also, I'm aware that there are certain schools of thought that category and tag pages should be no-indexed to avoid duplicate content issues. Can anyone shed some light on this from first hand experience? Thanks in advance!
Intermediate & Advanced SEO | | goldbergweismancairo0 -
Wordpress Duplicate Content
We have recently moved our company's blog to Wordpress on a subdomain (we utilize the Yoast SEO plugin). We are now experiencing an ever-growing volume of crawl errors (nearly 300 4xx now) for pages that do not exist to begin with. I believe it may have something to do with having the blog on a subdomain and/or our yoast seo plugin's indexation archives (author, category, etc) --- we currently have Subpages of archives and taxonomies, and category archives in use. I'm not as familiar with Wordpress and the Yoast SEO plugin as I am with other CMS' so any help in this matter would be greatly appreciated. I can PM further info if necessary. Thank you for the help in advance.
Intermediate & Advanced SEO | | BethA0 -
Wordpress Titles
My question is about long url titles, my client is using wordpress and the rankings are going well apart from two, which for some reason just wont move. After using some of the tools available on SEO moz which i have found very helpful I have spotted a re-occuring warning throughout the site, the titles, in word press you have this setting (below) page title : %page_title% | %blog_title% My question is my client has quite good brand online but I done want to impact this. The problem I have is that I have a Keyword in the title then the clients company name which is three words and takes up a lot of space. I am thinking about removing this but in two minds so i was kinda hoping for a bit of advice as this looks like a standard in wordpress. Mike
Intermediate & Advanced SEO | | TomBarker820