admin管理员组文章数量:1130349
I just changed my website's domain and the user profile pictures saved in wp-content/uploads/... still have the old domain in the url.
Example:
.jpg
And i want to change them all to
.jpg
How can I do this?
Thank you!
I just changed my website's domain and the user profile pictures saved in wp-content/uploads/... still have the old domain in the url.
Example:
https://www.olddomain/wp-content/uploads/2017/10/profile_pic.jpg
And i want to change them all to
https://www.newdomain/wp-content/uploads/2017/10/profile_pic.jpg
How can I do this?
Thank you!
Share Improve this question asked Nov 29, 2018 at 0:08 RyuuksRyuuks 1253 bronze badges 2- WordPress doesn't support profile photo uploads out of the box, how are you implementing this? How are the profile pic paths stored? It sounds like rather than using the attachment system it's storing actual URLs, and that's the problem – Tom J Nowell ♦ Commented Nov 29, 2018 at 0:39
- i think best way for you install duplicator plugin old domain and create package and download installer and zip file 2] upload this two file new domain and run installer. please check duplicator plugin vedio – vikrant zilpe Commented Nov 29, 2018 at 7:53
2 Answers
Reset to default 2I will allow myself to expand on Ricks answer as there are a few ways to change old domain to new domain and each might be helpful depending on your situation.
1) use the Better Search and Replace plugin https://wordpress/plugins/better-search-replace/ plugin as suggested in the answer above.
2) use Database Search and Replace script https://interconnectit/products/search-and-replace-for-wordpress-databases/
You can easily upload it to your server via FTP and then delete once you replace the domain names.
It does not require WordPress to run just PHP and MySQL (so this can be plus or minus depending on your use case i suppose).
3) if you have access to WP CLI (WordPress command line interface) you can use the wp search-replace command to update the domain https://developer.wordpress/cli/commands/search-replace/
With WP CLI installed on your server already, this is the quickest way to do that i think and does not require installing anything.
4) do it manually in the database, but with so many tools available i would recommend selecting a solution from #1 to #3.
If you need to change the URL in media records (or anywhere in the database), then a plugin like "Better Search and Replace" (my personal favorite that I use when moving sites) will easily replace the old URL with the new one. That is one of the steps that I do when moving a site to a new domain, or from a development system to the live system.
You can do it manually with commands via myPHPAdmin, but the plugin is much easier, IMHO. I usually install the plugin, run the search/replace, test, then remove the plugin.
Of course, a backup of your database before major operations is always a good idea.
I just changed my website's domain and the user profile pictures saved in wp-content/uploads/... still have the old domain in the url.
Example:
.jpg
And i want to change them all to
.jpg
How can I do this?
Thank you!
I just changed my website's domain and the user profile pictures saved in wp-content/uploads/... still have the old domain in the url.
Example:
https://www.olddomain/wp-content/uploads/2017/10/profile_pic.jpg
And i want to change them all to
https://www.newdomain/wp-content/uploads/2017/10/profile_pic.jpg
How can I do this?
Thank you!
Share Improve this question asked Nov 29, 2018 at 0:08 RyuuksRyuuks 1253 bronze badges 2- WordPress doesn't support profile photo uploads out of the box, how are you implementing this? How are the profile pic paths stored? It sounds like rather than using the attachment system it's storing actual URLs, and that's the problem – Tom J Nowell ♦ Commented Nov 29, 2018 at 0:39
- i think best way for you install duplicator plugin old domain and create package and download installer and zip file 2] upload this two file new domain and run installer. please check duplicator plugin vedio – vikrant zilpe Commented Nov 29, 2018 at 7:53
2 Answers
Reset to default 2I will allow myself to expand on Ricks answer as there are a few ways to change old domain to new domain and each might be helpful depending on your situation.
1) use the Better Search and Replace plugin https://wordpress/plugins/better-search-replace/ plugin as suggested in the answer above.
2) use Database Search and Replace script https://interconnectit/products/search-and-replace-for-wordpress-databases/
You can easily upload it to your server via FTP and then delete once you replace the domain names.
It does not require WordPress to run just PHP and MySQL (so this can be plus or minus depending on your use case i suppose).
3) if you have access to WP CLI (WordPress command line interface) you can use the wp search-replace command to update the domain https://developer.wordpress/cli/commands/search-replace/
With WP CLI installed on your server already, this is the quickest way to do that i think and does not require installing anything.
4) do it manually in the database, but with so many tools available i would recommend selecting a solution from #1 to #3.
If you need to change the URL in media records (or anywhere in the database), then a plugin like "Better Search and Replace" (my personal favorite that I use when moving sites) will easily replace the old URL with the new one. That is one of the steps that I do when moving a site to a new domain, or from a development system to the live system.
You can do it manually with commands via myPHPAdmin, but the plugin is much easier, IMHO. I usually install the plugin, run the search/replace, test, then remove the plugin.
Of course, a backup of your database before major operations is always a good idea.
本文标签: imagesWrong domain in uploads folder
版权声明:本文标题:images - Wrong domain in uploads folder 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749142596a2322458.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论