Wordpress: Move Multisite from server to localhost

前端 未结 4 1205
情话喂你
情话喂你 2021-02-06 00:04

I am trying to move a deployed WordPress Multi-Site to a local environment. I backed up the server database and files. In my local environment, I created a new database and impo

4条回答
  •  -上瘾入骨i
    2021-02-06 00:20

    This is close but a little different for a multisite that uses subdomains. You are required to edit your host file to show each site url as localhost(LINK):

    C:\Windows\System32\drivers\etc

    127.0.0.1 localhost
    ::1 localhost
    127.0.0.1   localhost.com
    127.0.0.1   subdom1.localhost.com
    127.0.0.1   subdom2.localhost.com 
    etc..
    

    Then, editing the database as stated above worked, ignoring any subdirectory changes beyond the .htaccess mentioned above but leaving the Base as /

     # MultiSite
    
     RewriteEngine On
    
     RewriteBase /
    
     RewriteRule ^index\.php$ - [L]
    

    In my install, I needed to update some across the headers and footers to get the styles to load.

    Thanks to @ninja for pointing me in the right direction!

提交回复
热议问题