Pages displays correctly but returning a 404 error in http header.

This issue can be a little difficult to triage. I would start by checking your permalinks structure. When you save it the new code will be written to the .htaccess file.

WordPress will behave like this when you request a URL that isn’t there. It will give a 404 but it will search through the database for a similar slug and show that page.

If you have a page at /content/my-post-slug and someone punches in /my-post-slug it will, usually, try to 302 Redirect to that post. I have run into cases where this 404 behavior happens, though. Something about the .htaccess mod_rewrite config causes WordPress not to redirect correctly.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)