简体   繁体   English

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

[英]Transferring Wordpress site to local server (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. 我已经开发了一个Wordpress网站,但是希望能够在我进行更改和尝试新事物时脱机使用它。

I have installed MAMP (Version 3.5) and copied my files over to the root directory via FTP. 我已经安装了MAMP(版本3.5),并通过FTP将文件复制到根目录中。 To test the transfer was successful, I tried to navigate to: 为了测试传输是否成功,我尝试导航至:

http://localhost:8888/PAS_wordpress (the folder name) http:// localhost:8888 / PAS_wordpress (文件夹名称)

In response, Firefox (which is the most up-to-date version) responds with a dialogue box: 作为响应,Firefox(是最新版本)通过一个对话框进行响应:

You have chosen to open: 您选择打开:

{BLANK} {空白}

which is: application/x-httpd-php (418 bytes) from http://localhost:8888 这是:来自http:// localhost:8888的 application / x-httpd-php(418字节)

What should firefox do with this file? firefox应该如何处理此文件?

If I open the file I understand that it is php script (shown below), but I dont know why it isn't being processed. 如果我打开文件,我知道它是php脚本(如下所示),但是我不知道为什么它没有得到处理。 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... 提前谢谢了...

在本地数据库中,导入一个SQL转储文件,然后进入WP_options表,您将看到前两行将是URL http://example.com将其更改为http://localhost

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM