Migrated Hosting to Droplet — Website Not Public — How Do You Make It Live?

Posted April 28, 2015 3k views

I migrated my contents and website following the LAMP installation.

Everything works fine and I can see my website, posts, and linking structure via the admin password from terminal.

How do I make my wordpress website live? The homepage is coming up in incognito and the linking is not loading.

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
6 answers

Here’s the case. I migrated hosting from shared to DO. I installed the site + database and when I log into admin on Wordpress. All the links are working.

Now: works.
But: does not.

Also, when updating Wordpress it asks for FTP password. Which does not work either.

Is something off with my htaccess or host files need to be adjusted?

Thank you in advance.

cc @thinkingmedia

  • You have Apache configured wrong. So the rewrite and file permissions are not working. I’ll try to give you some instructions on how to setup Wordpress for DO.

    First, make sure that the rewrite mod is enabled in Apache. It should be on by default.

     $ a2enmod rewrite

    Next, we’ll create a configuration for the website so that it runs out of /var/henksaene

    $ cd /etc/apache2/sites-available
    $ nano henksaenen.conf

    Next, copy and paste this text into the file. I’ve renamed things to match your config.

    <VirtualHost *:80>
        DocumentRoot /var/henksaenen
        <Directory /var/henksaenen>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        ErrorLog ${APACHE_LOG_DIR}/error.henksaenen.log
        CustomLog ${APACHE_LOG_DIR}/access.henksaenen.log combined

    Note, that this is for non-SSL only.

    Apache will write separate logs for this domain. Also, note that I made www an alias. So that Wordpress will load for both and Which one is the default depends upon your WP config.

    The import thing is AllowOverride All because by default Apache ignores the .htaccess file. Which has the rewrite rules for WP. So you have to allow .htaccess to override settings.

    Now, let’s assume you currently have all your Wordpress files located in /var/www/html. Let’s move them to /var/henksaenen, and give the www-data user the ownership.

    $ cp -R /var/www/html /var/henksaenen
    $ chown -R www-data:www-data /var/henksaenen

    Everything is ready, but we didn’t touch the database. I’m going to assume you already have that part done. If the database doesn’t work. Let me know, and I’ll walk you through the steps of importing a SQL dump of the WP site. The only other way to migrate the data is via a WP xml export (which can be tricky).

    So enable and restart apache.

     $ a2ensite henksaenen
     $ service apache2 restart

    You should be good after that.

Thank you so much for this @thinkingmedia

I went head and followed this and had issues once again. The site went into a white screen with Index, Name, Size, Description, etc.

I went back to the config file:

<VirtualHost *:80>

    DocumentRoot /var/www
    <Directory /var/www>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted

    ErrorLog ${APACHE_LOG_DIR}/error.henksaenen.log
    CustomLog ${APACHE_LOG_DIR}/access.henksaenen.log combined

And changed it to WWW. Do I have to wait for the site to copy over to the new dir or should it work right away?

Finally, I’m troubleshooting the automatic updates. Are there any permissions that might be carried over from the old host/admin-wp?


sudo chown username:www-data /var/www -R 
sudo chmod g+w /var/www -R

Worked for me!

  • I’m glad you got it working.

    The permissions for the files must have been wrong, but I don’t know how that could have happen.

    How did you copy the WP files onto the server?

@thinkingmedia the naughty way. I couldn’t get a good backup outside of the SFTP version / database backup. It hasn’t been smooth, but it’s working for the most part…