changed the WordPress URLs in General -> Settings
-
I changed the WordPress URLs in General -> Settings and now I cannot log in. I was trying to have the page I created as Home become the home page. I am using Mamp as my server and am not an IT guru. Help! please speak idiot simple.
-
I was trying to have the page…’Home’ become the home page.
That is something to be done at Dashboard > Appearance > Customize > Static Front Page.
Your database is now expecting a wrong incoming URL while also looking for WordPress somewhere other than where it is actually located. To fix that, you can temporarily add the following with your own specifics near the top of your local wp-config.php:
define('WP_HOME','http://localhost/whatever'); define('WP_SITEURL','http://localhost/whatever');https://codex.wordpress.org/Changing_The_Site_URL
If that does not work, you might also need this just once near the bottom of wp-config.php:
/** https://codex.wordpress.org/Changing_The_Site_URL#Relocate_method /* @ just above "That's all, stop editing!" in wp-config.php * WordPress supports an automatic relocation method intended as quick assist * for getting a site working after relocating it from one server to another. * After the "define" statements and just before "That's all, stop editing!", * add this next line (and a slash at the end of this one to turn it on): /*toggle on/off* define('RELOCATE',true); /* Next Login as normal after being certain of the address being sent from your browser. * Then look again in your browser's address bar to verify that you have logged in at the correct server. * If this is the case, next go to Dashboard > Settings > General and verify the address settings and save them. * Once the above has been completed, either remove the above 'define('RELOCATE',true);' line * or comment it out with '//' or change the 'true' value to 'false'. * Note: When the RELOCATE flag is set to 'true', the Site URL will be automatically * updated to whatever path is being used to access the login screen. This will get the admin * section up and running on the new URL, but it will not correct any other part of the setup. * Those will still need to be altered manually.I do not think you will also need this, but here it is anyway:
<?php /* @ near top of theme functions.php /*-either-*/ /* @ theme/functions.php /*toggle on/off* update_option('siteurl','http://domain.com'); update_option('home','http://domain.com'); /*-or-*/ /* @ near top of theme/functions.php /*toggle on/off* update_option('siteurl','http://www.domain.com'); update_option('home','http://www.domain.com'); /*-end-*/First, get things back to the way they should be 🙂
– start MAMP, if not already running
– start both the Apache and MySQL servers, if not already running
– from the MAMP Start Page, select phpMyAdmin from the Tools menu
– select your WP database from the list in the left sidebar; the name will be whatever you used when you created it
– select the wp_options table from the expanded list for the database
– select the Browse tab in the main (right) area
– find and edit the siterul and home fields with the correct value; do so by clicking on the pencil iccon
– if your MAMP installation uses the default settings for port number and document root, that is, you did not change these when you installed MAMP, the value you should enter for both these fields is:http://localhost:8888/name-of-folder-where-WP-files-are– if you used the usual method to extract the WP download and placed the resulting
wordpressfolder into Applications/MAMP/htdocs. then the above URL would be:http://localhost:8888/wordpress– after replacing the existing value with the correct one above, click the Go button to save; do this for both the siteurl and home fields
You will now be able to log into your site where you can do as leejosepho mentioned to set the Home page for the site.
Thank you both. Lyle’s solution did the trick.
Resolved
The topic ‘changed the WordPress URLs in General -> Settings’ is closed to new replies.