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

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:—-obtaining-an-ssl-certificate—-setting-up-virtual-hosts-(recommended)

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 (without url change)

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

Please, I’d deeply appreciate your help.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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: