I have migrated my WP site from a shared host to my own dedicated host and some weird issues are occurring. When I create a new post and press Publish, the page reloads and says the post has been published, however the url or the post given is just one with an ID, like how they give you preview links.
When I click on the post it just shows a 404 page, if I go back to my posts and look for the post... it doesn't exist.
I suspect its something to do with permissions either on the disk or the DB... can anyone help me troubleshoot?
Edit: I do have the Total Cache plugin, but I have cleared the cache completely after creating the post and it is still not there. I don't think this is the issue though, as at the very least the post should appear in my wp-admin (which it isn't)
Second Edit: Interestingly when I turned on WP_DEBUG in wp-config.php
I noticed the following error when creating a post:
WordPress database error: [The user specified as a definer ('user1'@'localhost') does not exist]
UPDATE `wp_posts` SET `post_author` = 1, `post_date` = '2018-04-01 21:32:12', `post_date_gmt` = '2018-04-01 20:32:12', `post_content` = 'something goes here', `post_content_filtered` = '', `post_title` = 'Test Post', `post_excerpt` = '', `post_status` = 'publish', `post_type` = 'post', `comment_status` = 'open', `ping_status` = 'closed', `post_password` = '', `post_name` = 'test-post', `to_ping` = '', `pinged` = '', `post_modified` = '2018-04-01 21:32:12', `post_modified_gmt` = '2018-04-01 20:32:12', `post_parent` = 0, `menu_order` = 0, `post_mime_type` = '', `guid` = '' WHERE `ID` = 49821
The thing is, this isnt the username or host defined in my wp-config.php file, so I'm not sure why this error is occurring. If I update the existing define('DB_USER', 'dd_wp_user');
in my wp-config.php file to something non-existant though the page shows a DB error so the config is being read.