0

My WordPress website was recently moved from one a shared hosting provider to a VPS setup at Digital Ocean. I provisioned the server myself and have WordPress running on a LAMP stack with Linux Ubuntu 20. The website itself is working when viewed from the front-end, but it is experiencing issues when trying to add new posts or uploading media.

When I try to add a new post, the following warning is displayed below the title field: You are currently editing the page that shows your latest posts. The editor textarea and category blocks are missing, but ACF-related blocks and other plugin blocks like Yoast are still there. I have attached an image showing how it looks.

WordPress add post issues

I have checked the file permissions and ownership of the directories and files, and they are set correctly. All directories and files are owned by the www-data user and group. The only directory and files that are owned by my SFTP user is the custom theme.

I have run sudo find /var/www/domain.ca/ -type d -exec chmod 755 {} \; and sudo find /var/www/domain.ca/ -type f -exec chmod 644 {} \;, but this has not resolved the issue.

I have added define (‘WP_ALLOW_REPAIR’, true); to the wp-config.php file and run the repair and optimize using http://domain.ca/wp-admin/maint/repair.php. All tables were listed as okay after completion.

I have tried enabling define( 'WP_DEBUG', true );, but only notices are displayed.

When I try to upload an image using the media manager, the following error is displayed in the Firefox dev console: POST http://domain.ca/wp-admin/async-upload.php [HTTP/1.1 403 Forbidden 399ms] The server has its file size upload settings set to 8MB for upload_max_filesize and 10MB for post_max_size.

I can successfully edit existing posts and update media data like titles.

I can successfully execute a backup using the UpdraftPlus backup plugin.

The Your homepage displays setting under Settings > Reading displays Your latest posts.

When I save any setting, no success message is displayed by WordPress.

WordPress 5.8.2 PHP 7.4.26

Any ideas on what is going wrong?

Cheers,

3
  • Have you tried switching to a default theme like Twenty Twenty-One? Did the same issue persist? How about deactivating all plugins and if the issue disappeared, then activate the plugins back one at a time until the issue reappears?
    – Sally CJ
    Dec 16, 2021 at 1:10
  • @SallyCJ I have tried switching to Twenty-Twenty One and individually deactivated/activated each plugin separately with no success. When I disabled the Classic Editor plugin, the post-new.php screen was blank. Also, when I deactivated the ACF Pro plugin, the plugin update system showed updates, but disappeared after re-activating it. Something strange is occurring on this setup. Dec 16, 2021 at 14:59
  • @SallyCJ I have tried switching to Twenty-Twenty One and individually deactivated/activated each plugin separately with no success. When I disabled the Classic Editor plugin, the post-new.php screen was blank. Also, when I deactivated the ACF Pro plugin, the plugin update system showed updates, but disappeared after re-activating it. Something strange is occurring on this setup. Dec 16, 2021 at 14:59

1 Answer 1

0

I was able to diagnose this issue as database-related. During the original importation of the data, it looks like something got corrupted in one or more of the tables. I emptied and dropped all of the tables and performed a clean import. Performing this action resolved the create new post and media upload errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.