Ask your WordPress questions! Pay money and get answers fast! (more info)

How to change the URL direct for the wp-login page. WordPress

  • SOLVED

Hello WP People
I just had a website created in WP. I want to take this website and use it for a second website(domain name).

I am hosting the site at HostGator. I copied the WP code from the original folder inside the public-html folder to the new folder inside the public-html folder.
The second website is coming up great. Heres the problem when I attempt to login at the second website it takes me to the original website

Here what I mean

secondwebsite.com/wp-admin.php brings up the admin login. i login and then the URL automatically changes to originalwebsite.com/wp-admin

i can get into the cpanel file manager to edit the files in the secondwebsite folder.

i am pretty sure there is one line of code that i need to change from originalwebsite.com to secondwebsite.com

thanks in advance.
ilostmyeraser

hey guys.
i just wrote a huge summary and left the computer for more than a hour and it all got erased when i had to re-login....grrrrrrrr

heres the two sites
original: purecarehealth.com
second: bioforcelaser.com

heres the short version
i did the change to the config file. i added the two lines of code for the url.
when i logged into the bioforce wp admin it asked to do a database update.
the bioforce site is missing a bunch of pages..weird

Answers (4)

2010-10-31

Andrzej answers:

add this to your wp-config.php file:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');


obviosuly using the new path for your website. Should do.


Andrzej comments:

@MagoryNET read carefully, his problem is he cannot access the admin panel ;). To safe dirty work with phpMyAdmin, the fastest way is set it up in wp-config.php as I postedd (overriding DB settings by that). After, you can apply changes to DB and remove the lines.


Andrzej comments:

You also need to duplicate the db same as files, not sure if you already did?


Andrzej comments:

I can try to look into your problem but need additional budget.

2010-10-31

Jarret Minkler answers:

Andrzej Wins :(

2010-10-31

MagoryNET answers:

You need to login on the old page and change on wp-admin/options-general.php the url of the page to the new one - it's a change in database not in the files.

2010-10-31

Monster Coder answers:

If you are using same database, the solution is already given by Andrzej! However, if you are going to use separate database, you need to take some trouble, as I guess you can't login to go to wp-admin/options-general.php as said by MagoryNET!

You need to go to phpMyAdmin and update the 'home' and 'site_url' field to new path in *options table after you have copied the source database.

You also have to update the guid in *posts table as the URLs will be prefixed with previous URL.

Thanks