How to map or copy a wordpress site to a subfolder in an existing site's route?

前端 未结 3 1936
南笙
南笙 2020-11-28 15:09

I have a Wordpress blog (blog.xxx.com). I have a nuxt personal website yyy.com which is hosted on aws.

Now I wish to map or migrate the Wordpress blog (blog.xxx.com)

3条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 15:18

    If I understood your question correctly, you want to move your WordPress installation from blog.xxx.com to yyy.com/blog, right? There is an official guide for this provided by WordPress: https://wordpress.org/support/article/moving-wordpress/

    After you have changed the siteurl and home fields in table wp_options of your database to yyy.com/blog, you can use a plugin like Better Search Replace (https://wordpress.org/plugins/better-search-replace/) that scans your WordPress database and replaces every URL of posts etc. with the new URL of your blog.

    In addition, in case of an Apache webserver you need to take care of the .htaccess file and change the RewriteBase to /blog (assuming that it was / before).

    Some special plugins (for caching etc.) need some special treatment, but often clearing the cache solves the problem.

提交回复
热议问题