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
-
Is a Wordpress AMP plugin sufficient, or should we upgrade our WP theme to an AMP theme?
Hello there, our site is on a Flatsome Wordpress theme (which is responsive and does not support AMP), and we are currently using the AMP for Wordpress plugin on our blog and other content rich pages. My question is - is a plugin sufficient to make our pages AMP friendly? Or should we consider switching to a theme that is AMP enabled already? Thanks!
Intermediate & Advanced SEO | | tnixis
Katie0 -
Infinite scrolling issue?
Hi Guys, Reviewing this E-commerce page - https://tinyurl.com/ybjjwr65 Based on this Google article: https://webmasters.googleblog.com/2014/02/infinite-scroll-search-friendly.html It mentions: Make sure that you or your content management system produces a paginated series (component pages) to go along with your infinite scroll. How would you check this, is there a tool to conduct this test? Cheers.
Intermediate & Advanced SEO | | kayl870 -
Multiple h1 tags on this html 5 page a issue?
Hi Guys, I have a html5 page located here: https://tinyurl.com/yc6s3xs2 I know from some online discussions having multiple h1 tags on HTML 5 pages like this, shouldn't be an issue. Any thoughts on this? Cheers,
Intermediate & Advanced SEO | | bridhard80 -
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 -
WordPress Duplicate URLs?
On my site, there are two different category bases leading to the exact same page. My developer claims that this is a common — and natural — occurrence when using WordPress, and that there's not a duplicate content issue to worry about. Is this true? Here's an example of the correct url. and... Here's an example of the same exact content, but using a different url. Notice that one is coming from /topics and the other is coming from /authors base. My understanding is that this is bad. Am I wrong?
Intermediate & Advanced SEO | | JasonMOZ1 -
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 -
Google webmaster tool (GWT) owner removal issue
Hi! I have a new client, the former agency added the client property with the agency account so we had to create a new GA account (as you can’t transfer ownership at the account level) but we also kept access to the former account to keep historical data. We were granted owner access to the GWT (which is more flexible, you can remove owners and creators) and we now want to remove former agency users. We have 3 adresses. One was verified with delegation method (no pb for removal), one with meta tag (no pb) and one with Google Analytics. Here it becomes tricky as Google says regarding GA verif method “If this account was verified using a Google Analytics tracking code, you should make sure that the user you want to unverify is no longer an administrator on the Analytics account. Otherwise, removal may not be permanent”. The thing is that this user has the same email address as the one used to create the agency GA account (no ownership transfer) so I basically can’t remove admin rights. The other possibility, as Google mentions when I try to unlink this user, is “remove the administrator status in Google Analytics or delete the Google Analytics tracking code on the website”. But we don’t want to remove the code as we still want to track data with the former account for historical analysis purposes. Has anyone ever faced this situation? Do you know how to handle this? Do you think that unlinking the GWT and the GA accounts will unverify the GA method? Many thanks in advance ! Ennick
Intermediate & Advanced SEO | | ennick0 -
Countries - Duplication Issues
Hi there, We have a .co.uk website which has been up and running for the past 5 years now and we have now decided because we have a big market in Ireland .ie we want to have a .ie website, the question is, is it ok just to replicate the .co.uk for the .ie website? Are there duplication issues? Kind Regards,
Intermediate & Advanced SEO | | Paul781