-1

I had a properly functioning Wordpress site on a local XAMPP server which I wanted to transfer to a live server, so I went to check the instructions on wordpress.org on how to perform that. I made backups of my local wordpress folder and SQL database, went to Settings - General in the Wordpress dashboard (on the local XAMPP server) to change the WordPress address and the site address to suit the address of the live server (rendering my local Wordpress site inaccessible, as expected), made an export of my SQL database and uploaded the wordpress folder and imported the newly exported SQL file to the live server. There were issues because Wordpress didn't start working on the live server. After that I attempted to get the local Wordpress site to work again (which was still unusable because of the mismatching URL settings intended for the live server), so I manually changed the address settings by adding these to the functions.php file:

update_option('siteurl','http://localhost/wordpress');
update_option('home','http://localhost/wordpress');

as per instructed on wordpress.org on the subject of changing site URLs. After that I could see my Wordpress site's front-page (URL: localhost/wordpress, which is where all the Wordpress files are also located) and access dashboard, but trying to navigate to anywhere else on the site, e.g. opening another page than the front-page, redirects me to localhost/dashboard, which is the welcome page of XAMPP. Also, before the issues I used to access the dashboard via localhost/wordpress/admin, but this also gets redirected to localhost/dashboard. However, localhost/wordpress/wp-admin does work. Any clues why the redirection might be happening? Thanks for any help.

  • have you tried changing your htaccess file located along with wp-load.php? Just move it to another location outside Wordpress – Aniket Sahrawat Oct 31 '16 at 19:24
0

Apparently, for some reason, the permalinks formatting setting had changed to a different one that was used while building the site. I changed it back to what I was using before and everything works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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