问题
I can not believe that moving wordpress domain is so complicated.
I installed wordpress and setup an online shop using a theme based on woocommerce. After installing better-wp security plugin I bought a domain for my online shop. I point the domain name's DNS to my hosting and add the domain name to my hosting account
I then replace the database's url with the new domain using search and replace db plugin for wordpress.
then I go to wordpress admin setting - general and replace the site URL's sub directory path and wordpress home directory with the domain name.
but when I access my website now, all the link still point to the sub-directory's name for example: www.mywebsite.com/woocommerceshop and if I click it I get an error message: this webpage has a redirect loop err too many redirects
and all the icon's links are broken. Can someone help me to fix this and point me to tutorial on how to move wordpress domain
回答1:
The two resources that you need are those links:
https://codex.wordpress.org/Changing_The_Site_URL https://codex.wordpress.org/Moving_WordPress
The most important steps are:
- Change the siteurl and home in the wp_options table
- Run the query to change the domains the wp_posts table
UPDATE wp_posts SET post_content = REPLACE(post_content,'www.domain.com/wp-content/uploads','www.domain.com/images');
Maybe the plugin has missed something ...
来源:https://stackoverflow.com/questions/32021510/moving-wordpress-domain