Support » Installing WordPress » Installing wordpress in a subdomain from a main domain

  • Hi

    I’m trying to install a version of WP installed in my main domain due to some errors in that WP installed. What I want to do is to create a copy of the WP installed from the main domain to a subdomain. I copy all files in the new folder associated to the subdomain and created a copy of the database with a new name. I update the wp-config.php with new values about the new database and the new user. But when I try to log in and logged, WordPress redirects to the admin panel of the WP installed in the main domain.
    I change in wp-options table the values “siteurl” and “home” with the new value subdomain, and changed all the values referred to wp-config.php

    Do I have to make more changes?

    Thank you in advanced.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Check following things,
    01- Make sure your wp-config.php refers to new database.

    02. Make sure wp-config.php file does not contain any php variable or constant with your old domain name.

    I have no info pointing to the old domain. I don’t know why it is getting the old domain info.

    Is this local or on a live site?. If its example godaddy/hostgator check you have declared those in your cpanel.The stuff Mohamed says is where to start. From experience it looks like you have some values in your configuration or database still pointing back to your old settings. If you are sure all those are okay believe it or not annoyingly it’s good old basics. Clear your browser cache.

    It’s a local site in a VPS. How can I check those values that could point to the other database?

    Use phpmyadmin for easier interface with your database – then look at your “siteurl” and “home” option values in the table “wp_options”. The last time it happened to me I remember that although I had these two values correct, the “upload_url_path” in “options” and also all my “guid” in the “wp-posts” values were all incorrect.

    If all these are ok recheck your config file and .htaccess file then how you have declared this subdomain to your server.

    If this is localhost, depending on your server set-up you may have to enable the sites and configure them in your LAMP/MAMP/XAMP setup.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Installing wordpress in a subdomain from a main domain’ is closed to new replies.