• Resolved en10

    (@en10)


    Hello,

    I try to understand how work the cookie less domain for WordPress.

    I understand I need to create a subdomain or a domain and set the “home” of this domain to the folder wp-content of my wordpress.

    But if I changed my folder media for another folder than wp-content, how can I configure this folder to be in the cookieless domain?

    Thank you for your support.

    Best

Viewing 7 replies - 1 through 7 (of 7 total)
    • This is by no means a simple process. You will need a good understanding of how website hosting works, including logging into your hosting account, configuring domain names, configuring the WordPress wp-config.php file and applying bulk changes to the database using phpMyAdmin.
    • This can only work if you run your website from a www. address, e.g. https://www.itsupportguides.com — this allows you to separate the ‘cookie’ domain (www) and the cookieless domain (static).
    • This process, specifically step 3, will involve bulk changes to your content using database tools. I highly suggest you create a backup of your WordPress database before continuing. Using phpMyAdmin this can be done using the ‘export’ option.
    • Depending on the websites hosting environment it can take up to 24 hours for the new static sub-domain to start working. Typically it takes 5-15 minutes, but propagation of DNS changes can take up to 24 hours.
    • Step 1: Create a subdomain using cPanel or any other panel for the static content

      You will now be able to open static.domainname.com and see a blank page

      IMPORTANT: Test to make sure that your static address is loading – e.g. https://static.domainname.com (or https if you use it). DO NOT PROGRESS UNTIL THIS LOADS — you will see a blank page when it is working correctly.

      Note: it takes time for new subdomains to be available. Typically it takes about 10 minutes, but can take up to 24 hours depending on how you access the Internet. If you’re having problems accessing the subdomain, try from another Internet connection or using an online tool such as Pingdom Tools.

      Step 2: Configure WordPress
      Using your preferred method, for example FTP or through the cPanel, navigate to the root directory of your WordPress installation and edit wp-config.php
      Add the following lines to the top of the file, below the <?php

      Replace domainname with the domain name for your website

      define("WP_CONTENT_URL", "https://static.domainname.com");
      define("COOKIE_DOMAIN", "www.domainname.com");
      define("WP_PLUGIN_URL", "https://static.domainname.com/plugins");
    Thread Starter en10

    (@en10)

    Hello @codexdemon,

    Thank you for starting the explanation but your reply seems not complete.

    How can I do if my media folder is not in the wp-content?

    Best Regards

    @en10

    Here is quick help for you where you can find how to make cooking less domain which is not part of wp-content

    Cookie Less Domain

    So i made all my setup, change everything and does work. However it does not work anymore any login into the page, not under wp-admin not for social login.

    what do i oversee, who make the login possible ?

    in the log file i see nothing, not even the login requests. Anyone any idea ?

    thanks
    Dieter

    now reading a lot of articles i found one where the actual wp-config.php parameters look the first time different.

    it says, if your system let’s assume is configured as https://www.domain.com than you need following settings.

    define(“WP_CONTENT_URL”, “https://static.domain.com&#8221;);
    define(“COOKIE_DOMAIN”, “domain.com”);

    BTW: the wp_plugin_url settings seems to have no effect

    sooooo … my trouble maker is the define(“COOKIE_DOMAIN” any time i set this my social logins do not work anymore

    what do i overlook ?

    i tried everything like setting it to my https://www.doamin.com or domain.com

    nothing worked

    Thread Starter en10

    (@en10)

    Thank you @codexdemon ! ??

    @dhovorka I recommend you to create a new post for your trouble, it will be better for everyone ??

    • This reply was modified 7 years, 4 months ago by en10.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cookieless domain’ is closed to new replies.