Copy site to local server

I’m trying to copy a WP site,

to my localhost.
So I used FTP to get all the files from the server, use the export thing in phpmydmin to copy the tables to a new database on my localhost, lastly I edited the wp-config.php file to point to my new database, tried to see the site, and this is what I got


(its the 404 page)
I dont know what this means, it looks like it should work, but did I do something wrong?

Im guessing there are some absolute urls for the live site in the database so try doing a find and replace in your sql file substituting the live url with your local url and then reimport.

If you have the TXT file that you exported from PHPMyAdmin open it up in your text editor and find and replace:
mysite.com to your local address mysite.local (however you have your local environment setup).

Save and then import that into your local DB and it should work.

Also, if the above aren’t the problem, make sure that mod_rewrite is running on your localhost - various kinds of permalinks require that and will 404 if it isn’t working.

that worked (sort of), after I did that search/replace (urturt.com/localhost/urturt) I get


but when I try to go to the shop page, I get

, but using
http://linuxcommando.blogspot.com/2014/03/how-to-enable-modrewrite-for-apache-web.html
I found out that mod_rewrite is not enabled as this is the output

Array ( [0] => core [1] => mod_win32 [2] => mpm_winnt [3] => http_core [4] => mod_so [5] => mod_access_compat [6] => mod_actions [7] => mod_alias [8] => mod_allowmethods [9] => mod_asis [10] => mod_auth_basic [11] => mod_authn_core [12] => mod_authn_file [13] => mod_authz_core [14] => mod_authz_groupfile [15] => mod_authz_host [16] => mod_authz_user [17] => mod_autoindex [18] => mod_cache [19] => mod_cache_disk [20] => mod_cgi [21] => mod_deflate [22] => mod_dir [23] => mod_env [24] => mod_file_cache [25] => mod_include [26] => mod_isapi [27] => mod_log_config [28] => mod_mime [29] => mod_negotiation [30] => mod_setenvif [31] => mod_vhost_alias [32] => mod_php5 )

(mod_rewrite isn’t there)

I’m having trouble finding the .conf file to put

 <?Directory /var/www/>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Order allow,deny
  allow from all
 <?/Directory>

I’m using a wampserver

Thank you!

is this .ini file the one I should use?
http://www.youlikeprogramming.com/2014/12/repairing-your-wamp-configuration-file/ or should I follow c2dan advice on
http://forum.wampserver.com/read.php?2,60402,60533
my httpd.conf file has

<Directory />
AllowOverride none
Require all denied
</Directory>

in it, i changed that to

<Directory />
AllowOverride all
    Order allow,deny
Allow from all
#    AllowOverride none
#    Require all denied
</Directory>

and still get the same error if I try to go to the shop page though

think I figured something out, if I comment out

 #LoadModule rewrite_module modules/mod_rewrite.so

in the httpd.conf file, the module appears in the test_rewrite_mod.php page

Array ( [0] => core [1] => mod_win32 [2] => mpm_winnt [3] => http_core [4] => mod_so [5] => mod_access_compat [6] => mod_actions [7] => mod_alias [8] => mod_allowmethods [9] => mod_asis [10] => mod_auth_basic [11] => mod_authn_core [12] => mod_authn_file [13] => mod_authz_core [14] => mod_authz_groupfile [15] => mod_authz_host [16] => mod_authz_user [17] => mod_autoindex [18] => mod_cache [19] => mod_cache_disk [20] => mod_cgi [21] => mod_deflate [22] => mod_dir [23] => mod_env [24] => mod_file_cache [25] => mod_include [26] => mod_isapi [27] => mod_log_config [28] => mod_mime [29] => mod_negotiation [30] => mod_rewrite [31] => mod_setenvif [32] => mod_vhost_alias [33] => mod_php5 )

(31)
but now, when i click shop, I get

Before you go troubleshooting pretty links, I’d say log into your admin and revert to the default URL structure - site.local/p?=xx

Browse around and make sure your site is functional so you have a baseline. Beyond that, yes there is some fiddling with the configs and also your .htaccess file.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.