Getting started with a droplet on Digital Ocean, so far it's been a fun process. Now I want to begin migrating my site, so I set everything up and created an index.php to where to my root dir as a "construction" page for now. I'm setting up WordPress in a sub-dir and moved all of the contents via all-in-one WP Migration which has always worked perfectly for me.

I've given every dir and file inside of root/public_html (WordPress installation) rwx and atm ownership has been changed to www-data. So I got to loadup my site which atm would be something like <ip address>/public_html and I log in and I am propmted with the wp-admin screen. Everything is working, media files are uploaded, theme is there etc.

When I go to my home page, all the images load but I immediately notice the admin bar at the top, the wp-glyphs aren't loading and I'm getting those weird squares when your computer/phone doesn't know what it's trying to look at. Also any front-end page other than my home returns a 404. My homepage again is accessed by <ip address>/public_html so you would think my about page would be <ip address>/public_html/about, which is where WordPress is sending me to when clicked, but I receive a 404.

I've spent probably 4-5 hours now trying to figure this out and eventually turned to a guide that walks you through it but nada so far.

Can anyone offer a suggestion?


I'd like to add that I followed WordPress's instructions on modifying the .htaccess file. I'm assuming it goes in the subdirectory correct?


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /public_html/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /public_html/index.php [L]

Just as a reference for myself and anyone who might stumble upon this.


The answer was that apache was not configured correctly to read .htaccess files. If you are experiencing the same problems and have set up your own VPS, go to apache.conf, etc/apache2/apache.conf and find the correct <Directory></Directory> directive that corresponds with your website directory. Inside you should see an option that reads AllowOverride None. Change this to AllowOverride All.

If this is not the solution for you, at least it's another step out of the way.


Are you able to access wp-admin

If yes then go to dashboard->setting->permalinks and update the permalink and the problem solved

  • What would I update them to? My live site's permalink structure is https://<domain-name>.com/2018/03/17/sample-post/ and my new one is http://<ip-address>/public_html/2018/03/17/sample-post/. It's following the same structure but with an added directory which is where WordPress is installed. – Brandon Benefield Mar 17 '18 at 16:56

Access your dashboard by logging in wp-admin then access settings then permanent links, Change them to any of the provided styles save the change it again to your preferred one. This will work well.

Your Answer

