skip to Main Content

I have a domain that works like a charm www.mydomain.com. Recently I wanted to add a subdomain like myotherweb.mydomain.com, so i add my subdomain from my cPanel and upload my WordPress (works on XAMPP) to subdomain directory.

After that I try to open myotherweb.mydomain.com; the result is a blank page.

So I try to open myotherweb.mydomain.com/wp-admin and the WordPress login page shows up, and I can log in to my wp-admin dashboard page. But when I try to edit a page, the edit page is blank.

What is happening in this case?

2

Answers


  1. Chosen as BEST ANSWER

    I have solved this problem by install wordpress from my cPanel, and copy this setting from new Wordpress installation wp-config :

    AUTH_KEY
    SECURE_AUTH_KEY
    LOGGED_IN_KEY
    NONCE_KEY
    AUTH_SALT
    SECURE_AUTH_SALT
    LOGGED_IN_SALT
    NONCE_SALT
    

    then replace my Wordpress project wp-config, and it's magic. I don't know why it's necessary.


  2. Probably this case happens if transfer of wordpress is not proper or .htaccess is not proper set.

    1. .htaccess settings for subdomain
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*.php)$ $1 [L]
    RewriteRule . index.php [L]
    

    For more reference you can check on Wordpres Codex htaccess

    1. Transfer wordpress from one domain to another
      This is most common problem happens to many when transfer from one domain to another.
    1. Update Your wp-config.php File

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

    2. Update urls in sql

    For this open your exported database in text-editor like notepad+, sublime or netbeans, and do find and replace urls mydomain.com to myotherweb.mydomain.com and try import on live again,

    or if you are not familiar with this or this is boring task for you then you don’t need to panic, there is one plugin available to do this task for you very easily.

    Install WordPress duplicator plugin in your xampp and use as instruction given on plugin site or this reference site, after that upload new wordpress site generated by plugin on your subdomain.

    Hope it will work for you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search