简体   繁体   中英

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.

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...

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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