最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - How wordpress handle urls present in db for external wp-content directory

programmeradmin2浏览0评论

I have a site which I moved from one server to other. In source site the wp-content was external and maintained by hosting provided.

After migrating it to new server I changed all the urls and accoring to the new site and added the WP_CONTENT_DIR and WP_CONTENT_URL in wp-config so that the external folder is picked up by the site.

But the problem I faced is mostly all the urls present in the DB gets changed as per the WP_CONTENT_DIR I have mentioned in wp-config, but few doesn't.

SO can anyone tell me how wordpress handles the external wp-content dir after migration or how wordpress manipulates the urls present in the wp_posts table.

Example: my orignal site is and the wp-content is served from /srv/htpdocs/wp-content which is handled by the hosting provider automatically.

Now I moved my site to same url but to some other hosting.

As the hosting provider is different It is not handled automatically. So, I added WP_CONTENT_DIR as '/var/www/html/srv/htdocs/wp-content' and WP_CONTENT_URL as ''

So now link like '' gets automatically converted to while visiting the site. But few links present in the wp_posts table gave 404 error because they didnt get changed as per the WP_CONTENT_DIR.

Can anyone tell me the reason behind this?

发布评论

评论列表(0)

  1. 暂无评论