WordPress Accidentally Changed Site Url

In my previous project accidentally changed site url in the wordpress gerneral settings tab. As i don’t have wordpress admin login details i added following lines in the wp-config.php file to change the WP_HOME and WP_SITEURL.

Just add following lines inside the wp-config.php file inside PHP tag.

define('WP_HOME''http://' $_SERVER['SERVER_NAME']);
define('WP_SITEURL''http://' $_SERVER['SERVER_NAME']);
Read Also :  Wordpress Use Shortcode outside post editor in theme files

Be the first to comment

Leave a Reply

Your email address will not be published.