What I do
-
On receipt of WordPress files and Db install in my localhost directory (I use EasyPHP Dev server)
-
I then install Db and change wp-config.php to connect to local db etc.
-
Then copy .htacces to htaccess.back
-
Edit .htaccess to point at local dir structure (in this case find “~porterp6” and replace with “wordpress2”
-
Edit the wp-config.php file in your local directory with
define('WP_HOME','http://localhost/wordpress2/'); define('WP_SITEURL','http://localhost/wordpress2/');
-
In this case, also comment out the handler (line 2)
Your .htaccess would look like this
# Use PHP5.4 as default
#AddHandler application/x-httpd-php54 .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteBase /wordpress2/
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress2/index.php [L]
</IfModule>
# END WordPress
Afterwards
After you have done the work you need to do
- Zip all the files in wordpress2 dir up
- Enter the zip and
- Delete the .htaccess from the zip
- Rename htaccess.back to .htaccess
-
Comment out the wp-config.php manual site location entries like this:
#define('WP_HOME','http://localhost/wordpress2/'); #define('WP_SITEURL','http://localhost/wordpress2/');
You are ready to send back to the client – how to automate that last part – is a different question – how to remember to do it when you send it over in future – another question – form a habit of checking it is how I handle that.