I have a self hosted wordpress website hosted on Digital Ocean,setup as a subdomian; ubuntu server running apache. I am trying to setup a development server to test out plugin changes and wordpress upgrades. I want the data to mirror the main site. To do this I dumped the wordpress database using mysqldump. On the test server I imported this, also duplicating the wp database username and credentials.
Now, for some reason, when I go to the test url address, the wordpress site redirects the url to the test server ip address. There other people who have had this issue; and I have tried these suggested solutions:
- Update the site url in the wp-admin. I can access wp-admin, but the fields to do this update are greyed out
- remove OR having the statically defined WordPress Address (URL) and Site Address (URL) in the wp-config. I tried both ways, nonthing.
- Update the database directly with the new url. I used http://codepen.io/EightArmsHQ/full/nzEjI
- Clear browser cache and user a private browsing tab.
- If I do a fresh install of wordpress on the server, it does not redirect
I also, verified there is no dns record issue, because, I replaced the site with a simple 'hello world' index.php, and the test url stays. As for apache, I defined this in a sites-enabled file:
<VirtualHost *:80>
ServerName test.mymainwebsite.com
DocumentRoot /var/www
</VirtualHost>
I am opened to suggestions from the community on how you setup your test servers. Maybe I'm just going about this the wrong way. I still would like input on why this could be happening.
.htaccess
file in any way?