• I am planning to host my blog in two different servers that uses different domains but uses the same database (incase anyone wants to know, I am trying something with qTranslate) however I am wondering if in wp-config.php I am able to change the language & domain of the blog.

    Basically, rather then doing it via the database, I want to know if I can do it in the config file. Also, I can’t remember how to default the default language in wp-config.

    Many thanks if anyone knows that I am talking about (haha).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Use one or the other of these:

    define(‘WP_SITEURL’, ‘https://example.com/wordpress’);
    define(‘WP_HOME’, ‘https://example.com/wordpress’);

    OR

    define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’] . ‘/path/to/wordpress’);
    define(‘WP_HOME’, ‘https://’ . $_SERVER[‘HTTP_HOST’] . ‘/path/to/wordpress’);

    ===================

    This is further down in wp-config.php

    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
    * language support.
    */
    define (‘WPLANG’, ”);

    Thread Starter Snat

    (@snat)

    Ahh right. Many thanks for this. This has worked exactly as I needed it too.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Defining WordPress URL in wp-config.php’ is closed to new replies.