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
-
Whats the Best way to Protect Wordpress Website from Getting Hacked.
Hi All, I just like to know whats the best way to protect wordpress website for getting hacked. I tried using Wordfence but nothing much happened. I m in shared Host and when ever there is a sign of attack my hosting company takes the site off which affects my site ranking a lot. I m trying to keep all my plugins updated but still it happens . Like to know what other people do . I am open for Paid tool suggestion as well. Thanks
Intermediate & Advanced SEO | | Verve-Innovation0 -
Crawl Issue for Deleted Pages
Hi, sometimes, I just delete a page and not necessarily want to make a 404 to another page. So Google Webmaster Tools shows me 108 'not found' pages under 'Crawling Errors'. Is that a problem for my site?
Intermediate & Advanced SEO | | soralsokal
Can I ignore this with good conscience?
Shall I make 404 to my homepage? I am confused and would like to hear your opinion on this. Best, Robin0 -
Does anyone else have issues with atomysolutions.com?
Nearly all of my domains in webmaster tools show thousands of links to me from atomysolutions.com. Problem is only a couple links show up to them in OSE so can't learn much there. I try to access their site but every page I do I get a 403 forbidden error. All I can gather is they are some kind of health and beauty thing. I did a site search in Google and looked at the cached result of the first page but it took me to sexyshoes.co.uk or something. I honestly cannot figure out. OSE shows them as one of my linking domains, but I can't see any of the pages linking to me. I need to know if this is a spammy site that I need to disavow. I have no idea how or why they link to me. Any insight from any Mozzers is GREATLY appreciated! 🙂
Intermediate & Advanced SEO | | DanDeceuster0 -
Wordpress access denied
In Google Webmaster tools after doing a Google Fetch for our Blog which is showing Access Denied for 900+ pages this is the report that comes up and I wonder if this is causing the 900+ pages to show "Access Denied" and if so how to rectify it? The page seems to redirect to itself. This may result in an infinite redirect loop. Please check the Help Center article about redirects.```
Intermediate & Advanced SEO | | NileCruises
<code>HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=UTF-8
Location: http://nile-cruises-4u.co.uk/blog/
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Thu, 05 Jul 2012 07:04:05 GMT
Content-Length: 157 <title>Document Moved</title> Object Moved This document may be found here I</code>0 -
Changing Wordpress Permalinks Bad For SEO?
Hi, I have various pages set up such as http://www.musicliveuk.com/home/wedding-singer. Is there any benefit in SEO terms to changing it to http://www.musicliveuk.com/live-music/wedding-singer? I would presume that a keyword would be better for SEO than 'home' which is irrelevant? Also if I were to change it would all the links external I have on other sites pointing to http://www.musicliveuk.com/home/wedding-singer be lost as the url no longer exists? I suppose I could set up a manual redirect from http://www.musicliveuk.com/home/wedding-singer to http://www.musicliveuk.com/live-music/wedding-singer or would wordpress automatically redirect from the old to new? By redirecting I understand that some 'link juice' is lost along the way so is including the keyword in the url of enough benefit to warrant losing some link juice? Finally if I do change the url to include the keyword how do I do it in wordpress? I can only see how to change the page title using the 'edit' button when editing a page?
Intermediate & Advanced SEO | | SamCUK1 -
Technical SEO issue
Hi Everyone, I have encountered a major issue in one of my clients website(kitchen appliance website). This client has 2 main websites (A & B) linked with each other representing 2 different categories of appliances. We are trying to create some brand pages that this store carries. One brand page has been created and when searching for it on SERP, the results found should be under URL A but it is under URL B. I don't know what is going on? Can someone explain me what happened? Thank you,
Intermediate & Advanced SEO | | Ideas-Money-Art0 -
New folder structure
We are in the process of relaunching one of our website's that will use a totally need folder structure. Previously we used mydomain.com/content/country/region/city/district/hotel_name/ Now we are changing to make the URL shorter, more precise - since we are using a new CMS, to be mydomain.com/gb_Hotel-Name/ My question is currently we've in the region of 10,000 pages indexed in Google. So we are going to have to create 301 permanent redirects from the old URLs to the new URLs. From your previous experience, is this the correct way of approaching the task.
Intermediate & Advanced SEO | | NeilTompkins0 -
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