0
votes

When I go to http://www.cowrubber.com/wp-admin

the url changes to http://cowrubber.com/wp-admin/cowrubber.com/wp-login.php?redirect_to=http%3A%2F%2Fcowrubber.com%2Fwp-admin%2F&reauth=1

Somehow I just can't access the admin page to login.

I have copied the site from an test site on the localhost. And changed the url's in the database to the new ones but due to unknown reasons I just can't access the admin site.

1
Not entirely sure what the issue is but if you go this link: cowrubber.com/… you will get to your admin page - Alex Turner
That takes me to the login indeed:) but when i login i am redirected to cowrubber.com/cowrubber.com/wp-admin and then i just got a blank page somehow. - Rene Cop
Try taking out the duplicate cowrubber.com/ that might take you to the wp-admin page, however this doesn't fix your issue. I assume its a site url OR htaccess issue but I cant be sure of that without delving deeper. - Alex Turner

1 Answers

0
votes

When you move a wordpress to a differently named domain, it is not ehough to just search and replace in the database, because wordpress (sadly) store a lot of things in serveral table in serialized format.

So what you need to do is, in your case:

  • Create a backup of your local database.

  • Create a backup of your current production database and file.

  • Delete all the files from your production server, and drop all table from production database.

  • Copy all files to your production server from localhost.

  • Import the local database to production database.

  • Do not open the production wordpress site in the browser!

  • Go to here, and download the newest script: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

  • Unzip it into a wp_replace directory.

  • Upload this directory to your document root, where wp-conifg.php is.

  • Go to the http://example.com/wp_replace/

  • Fill the From and To fields, without http:// and without trailing slash. Eg: somethinog.localhost to 'example.com`

  • Live run it. You will see, how many records changed in wich tables.

  • Delete this wp_replace directory. If you leave it, add a htpasswd to it otherwise anybody can crash your db.

  • Go to the WP admin, navigate to Options -> Permalinks. Push save.

  • Now you can use your new domin :)