Publishing failed. You are probably offline.
Honestly, this is not a very common WordPress error, I’ve only experienced this once when I installed WordPress on one of my servers a few days back.
Here are a few ways to fix it this publishing failed issue.
Disable caching.
Disable caching on your WordPress installation – by deactivating the caching plugin -, server or if you are using a CDN.
Check for Plugin or Theme Error/s.
This is best done by using the Health Check & Troubleshooting
3. Enable WordPress Debug and Review the Logs.
You can enable this by editing the wp-config.php file located in your installation folder.
define( 'WP_DEBUG', true );
Here’s what I did on mine.
1. Checked the URLs in General Settings
2. I also checked wp_options table if the table is marked as crashed, and also the URLs if it’s correct
3. Added this snippet on the wp-config.php file and it worked.
define('WP_HOME', 'https://www.yourdomain.com');
define('WP_SITEURL', 'https://www.yourdomain.com');
If the above suggestions doesn’t work, contact support.