unable to publish content on wordpress after moving WP to virtual host folder

December 17, 2018 1k views
WordPress Apache Ubuntu 18.04

Hi there,
-I created a droplet using the WordPress one-click installation on ubuntu 18.04
-I secured it with SSH Keys.
-I secured my site with SSL certificate from Let’s encrypt
-Prior to that, I created a virtual host file and moved the site to a virtual host folder, following these tutoials:



Finally, I managed to enable secure WordPress updates, following this tutorial:

Everything OK so far. (I’m able to update WordPress; install activate and deactivate plugins, upload images, install activate and deactivate themes.)

The only problem I have is that I’m unable to write content on WordPress (create or update entries or pages).
Whenever I try to create or update any content on my WordPress admin, it fails. I cannot even save my drafts.

The console of my browser shows 404 errors and it seems it have to do with this . api-fetch.min.js?ver=2.2.5:1

At first, I thought it was something to do with permissions, but I discarded that since I gave 755 permissions to the www-data user and www-data group to the host folder and indeed I must have access from my wp admin page (otherwise, I wouldn’t be able to upload images or install and activate plugins)

I think my trouble has something to do with the virtual host I created. Something I didn’t configure properly,

I tried setting up my .htaccesss file, following this tutorial https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory (without url change)

Nothing has worked so far. So frustrating..
what am I doing wrong?

Please, I’d deeply appreciate your help.

1 Answer

Hey friend,

If I had to guess, I’d bet that your Wordpress site URL is misconfigured. Check out this guide and make sure that the URL is configured properly in the instance:



Have another answer? Share your knowledge.