I will be designing and developing a website for a client but want to allow the client to add content while I am working on the design and development of the site so that it is pretty mich done by the time I am finished.
Currently, I use XAMPP on port 81 so my project URL looks something like
http://localhost:81/projectname
My wp-config file has all the settings I need to the remote DB and yet, when I run the
http://localhost:81/projectname
URL it constantly redirects me to
http://localhost/projectname.
I’ve removed all htaccess files thinking the problem was there but that didn’t work. My ISP suggested opening port 3306 which I have done but that’s not done the trick either.
I don’t know if it has to do with port 81 on Xampp perhaps?
EDIT:
General settings link through to the online version of the site so
Site Address = http://example.com
WP Address = http://example.com
Many thanks
2 Answers
I think s_ha_dum is in the right track, but I think he got it backwards.
You want to:
- develop/design locally
- connect to the REMOTE database and work with his content?
You need a remote (staging) installation of WordPress, where the client can create/enter his content.
You need your local WordPress site (localhost) to point to the remote database, to grab the content he is using.
So, you would have your http://example.com/wordpress set up for the client to edit – just even with a vanilla WP install. This site would be connected to it’s own database.
Your localhost site would have the REMOTE site’s database credentials, with the DB_HOST
set to http://example.com, or whatever the mySQL path is if it’s accessed another way through your hosting provider.
On your local site, keep the WP_SITEURL
and WP_HOME
set to localhost. Otherwise, you’ll get redirection loops.