dongpa5277 2016-11-08 02:42
浏览 80

Wordpress index.php不会加载到本地服务器上

I have a working wordpress site online, running on an Ubuntu 16.04 VPS. I've typically just edited the files via FTP, but I'm trying to get more organized. I'm setting up a development machine with VirtualBox running Ubuntu 16.04 (with Windows as the host OS) so I can experiment. I'm having trouble getting wordpress to load.

I've copied the website files into the VM. I have PHP 7.0.12 installed in the VM. I have the database copied over and it's running fine in the VM. I start the PHP server with

cd /path/to/website/public
php -S 0.0.0.0:8080

When I visit localhost:8080 from Chrome in Windows, I get a Page not found error in chrome. However, I create a public/info.php file with <?php phpinfo(); ?>, and then visit localhost:8080/info.php, I get the correct PHP info page.

I also tried configuring Nginx inside the VM like I have it on the real server. I get the exact same results as with the built in PHP server.

When I visit localhost:8080/wp-admin, I get redirected to the admin page of the live server.

Any idea on what I'm missing or how I might go about debugging the issue?

  • 写回答

1条回答 默认 最新

  • duadpnld426905 2016-11-08 04:00
    关注

    When move WordPress to another domain, Instead of directly copying Database, we have to use Database migration plugins or manually updating content on DB.

    https://wordpress.org/plugins/wp-migrate-db/

    https://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs

    Then use this updated DB and copied files. That will solve your issue.

    评论

报告相同问题?

悬赏问题

  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?