500 error for all pages and post after move localhost to server
-
17-04-2021 - |
Question
today i move to the folder local to server after that i got 500 error for pages and post
but in home page everything showing fine but other linkes are not working
what i did?
- add apache2 conf and point domains
- edited database (checg http://localhost/triber to realdomian)
what happen after that?
only home is is working fine images are other post are showing but other links are not working
error messages
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
same other question abut my issues
1.Can't access wp-admin Internal Server Error 500
2.500 Internal Server Error after Register dialog, but with successful registration
3.500 Internal server error after changing php version
4.500 error after WordPress homepage URL changed
6.500 Internal Server Error after attempting to switch from subdirectory to addon domain
Solution
First change database name, username and password in the config.php file
/** The name of the database for WordPress */
define('DB_NAME', 'DB_NAME');
/** MySQL database username */
define('DB_USER', 'DB_USERNAME');
/** MySQL database password */
define('DB_PASSWORD', 'DB_PASSWORD');
then upload the database and run the following queries, this will change all the local links to your live url
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
After this wp-admin should work, then login and go to settings>permalink and hit save which will reset the redirects.