DigitalOcean Url forwards to server ip

Hey there, I'm starting a new multisite with a host I've not used before. What am I doing wrong?

The install went fine, but when I put in the url talewindink.com it shows the basic site install, but the url bar shows the ip instead of 'talewindink.com'

http://104.131.31.71/

or after a little bit in the .htaccess it goes
either to a 'too many redirects' or to this
http://104.131.31.71/wp-signup.php?new=www.talewindink.com

I've used both these tutorials:

https://www.digitalocean.com/community/tutorials/how-to-set-up-multiple-wordpress-sites-using-multisite

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean

.htaccess

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# END WordPress

relevant wp-config.php

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', '104.131.31.71');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/*define(‘WP_HOME’,’http://talewindink.com’);
define(‘WP_SITEURL’,’http://talewindink.com’);
*/

/* That's all, stop editing! Happy blogging. */

Ubuntu WordPress on 14.04

  • Stacie

    I'm not sure what you mean.

    I spun up a Wordpress droplet and edited the files needed to change the install into a MU install.

    If I change
    define('DOMAIN_CURRENT_SITE', '104.131.31.71'); to
    define('DOMAIN_CURRENT_SITE', 'talewindink.com');
    I get
    http://talewindink.com/wp-signup.php?new=talewindink.com
    and

    The webpage at http://talewindink.com/wp-signup.php?new=talewindink.com has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
    Learn more about this problem.
    Error code: ERR_TOO_MANY_REDIRECTS

  • Ash

    Hello @Stacie

    I hope you are well today.

    When you installed your wordpress, you are using your IP, right?

    If yes, in that case, you need to make changes inside the database. Please follow the instructions from the codex page:

    If, instead, you are changing domains, then the best way to move Multisite is to move the files, edit the .htaccess and wp-config.php (if the folder name containing Multisite changed), and then manually edit the database. Search for all instances of your domain name, and change them as needed. This step cannot yet be easily automated. It's safe to search/replace any of the wp_x_posts tables, however do not attempt blanket search/replace without the Search and Replace for WordPress Databases script (aka the interconnectit script).

    If you're moving Multisite from one folder to another, you will need to make sure you edit the wp_blogs entries to change the folder name correctly. You should manually review both wp_site and wp_blogs regardless, to ensure all sites were changed correctly.

    Also, manually review all the wp_x_options tables and look for three fields and edit them as needed:

    home
    siteurl
    fileupload_url

    Please let us know.

    And make sure you keep a backup of your database before making any changes.

    Cheers
    Ash

  • Ash

    Hello @Stacie

    I understand it's not moving, but you want to change the domain (from IP to your domain) and it's almost same procedure :slight_smile:

    As I asked, would you please reply:

    When you installed your wordpress, you are using your IP, right?

    I am asking this because, wordpress saves the first url in the database and that one is used as site url. So when you installed wordpress, if you used IP to install then the IP is saved in the database. So, in the database you need to change the IP to your correct domain.

    If you can recreate the droplet that's great. But before installing wordpress make sure you are using your domain name instead of IP to browser default apache page.

    Let me make you more clear. If you recreate, and after installing LAMP (or nginx) you will see the default server page (It works or something like that) and make you sure you are using domain, not the IP.

    Then start installing wordpress. And during the installation, again, make sure you are installing wordpress using your domain, not IP.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • Ash

    Ahh I see. One click installer is not recommended at all. The on-click app is designed for a single site. Not sure how it responds if you convert it into a multisite.

    Should I start over and change the site url in the wp admin before i upgrade to mu?

    I can't confirm if just changing site url in wp-admin will work in this case. Multisite handles the database in a little different way. The site is stored in some more fields rather than just the two fields as single site.

    You can give it a try, but as I said I never tried one click installer in DO.

    Anyway, if you can install wordpress manually that would be really great. You can check this blog post about this: http://goo.gl/tww84Y

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • Stacie

    Ok, getting really close. the url works, but the ftp/ssh key settings i put into the wp-config don't seem to allow me to install themes or plugins.

    I tried to follow this https://www.digitalocean.com/community/tutorials/how-to-configure-secure-updates-and-installations-in-wordpress-on-ubuntu
    but i'm not sure what I did wrong.

    p.s. looking forward to working my way through your a-z email post soon, Ash

  • Andre Foisy

    Hello there @Stacie

    Welcome back to the community, I hope you're going well today.

    As much as I really would like to help and try to see what you may have done wrong, it is hard to find out if do not know what exactly you have done since the exchange you had with @Ashok here above.

    When, you say "getting really close", what does that means exactly? Have you done a complete manual re-installation as suggested, have you brought the recommended correction to the database?

    I've never used digital ocean, and hopefully it is really useful and worth it for you to use it. However it seems there are many hops to finally get a sound WPMU installation. For example, I've never came across the need to put ftp/ssh key settings in wp-config before. I understand this hosting service is specifically created for developers, and we are more than happy and willing to help our members, but since this is very specific and proprietary hosting service and server settings, don't they have a nice community with forums and tech support staff, like we have here :wink: to help their members solve their problems with their service?

    Did you happened to ask them the question about what you are facing now, for that ftp/ssh key configuration?

    Like I said, we certainly do everything we can to help our members on whatever WordPress needs, and we go onto great length to do just that, but in this case it looks more like it is a specific hosting and server configuration issue that you are facing, and struggling with, and for you own sake I believe you would get much better help from the builders of the service you are working on, what do you think?

    That said, please do not ever hesitate to ask for help here whenever you need it.

    Best regards,
    Andre

  • Stacie

    I did a new vps with a base LAMP install, and installed wordpress from command line, and am now running a wordpress mu install. I didn't have to mess with the db at all, aside from creating the initial database and user at the mysql prompt.

    @Ashok was right, a fresh install made things easier.
    The url is behaving properly now, if you type http://www.talewindink.com you arrive at my wp install.

    DigitalOcean just provides a virtual server, so using them is just like using an Ubuntu install anywhere. I am comfortable enough with command line, but a bit rusty on a lot of topics. MY confusion is not really DO related.

    It should be obvious with the links I keep posting that I am reading DO tutorials and posts. This is, however, WP/WPMU related.

    I'm using an SSH key to connect, and thus don't have a ftp/pass to give to wordpress. Again this is not specifically a DO host thing, as it is in WP options to set up. using a key is just for security/convenience.

    I attempted, as in the link, to create a wordpress user with it's own key to let the website be able to do so. Either I think I did it wrong, or my folder permissions are wrong. or both, not sure.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.