Viewing 7 replies - 1 through 7 (of 7 total)
  • Did you change any URL settings in the WP admin? Under Settings -> General you’ll need to change both the WordPress Address (URL) and Site Address (URL) to the new URL test.mysite.com.

    However, I’m not sure if both www.mysite.com and test.mysite.com share the same database? If that’s the case, then changing a setting on one site would also change it for the other site.

    So, having said that….. Let’s say you want both sites to use the same database, but having their own URLs. In that case, don’t change the settings for WordPress Address (URL) and Site Address (URL), but put this in WP-CONFIG.PHP on the test.mysite.com:

    define('WP_SITEURL','http://test.mysite.com');
    define('WP_HOME','http://test.mysite.com');
    Thread Starter Demiano

    (@demiano)

    Hi Senff,

    Thanks for your answer. The two sites DON´T share the same database. Each one has its own and its defined in each wp-config.php

    But how do I chage WP Address and Site Address if I can´t even log into the admin dashboard? Is it possible to change these settings via FTP?

    Could the snippets you provided do the job?
    Or has the whole issue something to do with permalinks?

    Thanks,
    Demian

    Thread Starter Demiano

    (@demiano)

    Hi Senff as an update: I have added the snippet after define(‘WP_DEBUG’, false);

    but that did not change anything.

    Thanks,
    Demian

    This tool will replace the old link/path with the new one in the test site database.

    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Make sure it’s hooking into the correct database that you want to change the url on. Then run a search and replace…

    replace..
    http://www.mysite.com

    with
    test.mysite.com

    Should work, after you run the tool you need to login to the WP admin area, go to Settings -> Permalinks and update the permalinks.

    Don’t forget to delete the tool from your server after you’re finished using it.

    Thread Starter Demiano

    (@demiano)

    Hi WPlamp, thanks for the tip!

    2 questions though:

    – Do I get it right that I upload this script to the test server in public html?

    – maybe I need to re-define something more within wp-config.php
    If the path to the domain is ‘/’ the path to test.domain is ‘/test’ ?
    or ‘test.domain’ ?

    Thanks,
    Demian

    Thread Starter Demiano

    (@demiano)

    I have checked through phpMyAdmin the wp_options tables within the database for the test.mydomain and it shows the site url and home correctly.

    But what I see is that there is a user admin with a password that does not work within the wp-admin window. How can that be? What does it mean? Also I see within wp_options that the table for template and stylesheet shows “twentythirteen” instead of a reference to my premium theme.

    Still when I try to login into test.mydomain it goes to:
    http://test.mydomain.com/wp-login.php?redirect_to=http%3A%2F%2Ftest.mydomain.com%2Fwp-admin%2F&reauth=1

    And strangely when I try to login to http://www.mydomain.com it goes to:
    http://test.mydomain.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.mydomain.com%2Fwp-admin%2F&reauth=1

    @wplamp: I have not tried to run the script yet because it seems “dangerous” to me while there seems something so messed up and confused between my test site and my main domain.

    Please help.
    Thanks, Demian

    Please help

    try to see the database. the WP_OPTIONS table. find the siteurl and change it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can´t log in in after cloning to subdomain’ is closed to new replies.