1

I have just followed this guide on manually migrating a WordPress site to localhost.

I have followed all of the steps: downloading files using FTP, exporting database, importing to localhost database, changing URL links to localhost and finally updating wp-config.

I tried this on two of my sites and came across different problems:

  1. Safari cannot connect to the server' error message
  2. The following text displayed on the screen:

"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 advise as to how I can make my website display?

3
  • possibly try renaming/removing your .htaccess wordpress.stackexchange.com/questions/144024/…
    – mrmadhat
    Commented Jul 15, 2017 at 23:07
  • 1
    Possible duplicate of Index showing source code
    – mrmadhat
    Commented Jul 15, 2017 at 23:08
  • would be useful to clarify what web server you're using on your 'live' site and what you are running locally.. e.g. is it apache? do you know that you setup your local apache and PHP correctly?
    – mozboz
    Commented Jun 26, 2020 at 11:55

3 Answers 3

0

First of all what I assume is your local server is not parsing the php properly. So just put a simple phpinfo file and see if that show you the expected page. You can take reference from the following link if you don't know how to create a phpinfo page - https://mediatemple.net/community/products/dv/204643880/how-can-i-create-a-phpinfo.php-page

If the above shows you phpinfo information, then I would say check your wp database. In wp_options table, see if your site is still pointing to your domain or http: //localhost. It has to be http ://localhost.

see step 4: http://www.inmotionhosting.com/support/website/wordpress/wordpress-changing-the-site-url-and-home-settings

lastly, if above don't work, replace your .htaccess with a default wp one and see how that goes. good luck.

0

Did you rename your site name in wp_option table in database? That's probably the problem. Change the site name to http://localhost or http://localhost/[the directory name for the site].

0

You only need to install wp all in one migration plugin 6.74 in both local and live platform. Then you can export from the live and import it to the local using same plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.