duanduo3712 2016-03-03 07:33
浏览 191

将Wordpress站点转移到本地服务器(MAMP)

So, this is very new to me - I do not have a lot of coding experience! I have developed a Wordpress site but want the ability to work on it offline as I make changes and try new things.

I have installed MAMP (Version 3.5) and copied my files over to the root directory via FTP. To test the transfer was successful, I tried to navigate to:

http://localhost:8888/PAS_wordpress (the folder name)

In response, Firefox (which is the most up-to-date version) responds with a dialogue box:

You have chosen to open:

{BLANK}

which is: application/x-httpd-php (418 bytes) from http://localhost:8888

What should firefox do with this file?

If I open the file I understand that it is php script (shown below), but I dont know why it isn't being processed. I have spent some time now trying to find answers. Some other people seem to have had similar problems, but not quite the same, or the solutions provided just dont work.

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

Can anyone help please? I am determined to get this to work! Many Thanks in advance...

  • 写回答

1条回答 默认 最新

  • dongzhi9192 2016-03-03 08:20
    关注

    In the local database, import an SQL dump file and then go into the WP_options table and you will see the first two rows will be a URL http://example.com Change these to http://localhost

    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看