At the moment I am trying to transition my wordpress site to another host. I got a backup and imported it to a new database. I am trying to test all functionalities on a new database plus hosting provider.
When connecting to it, it redirects me to my live site.
https://wordpress.stackexchange.com/questions/256457/disable-ssl-https-for-wordpress
I followed steps here. My current testing url lets say is test-001-site3.btempurl.com
I changed the values from the query below to my testing url
SELECT * FROM wp_options WHERE option_name='siteurl' OR option_name='home';
no success, I've also edited the config file to have
define( 'WP_SITEURL', 'test-001-site3.btempurl.com' );
define( 'WP_HOME', 'test-001-site3.btempurl.com' );
may i ask how do I disable the redirect, I am unable to access /wp-admin as well
Normally defining in the config.php should work.
Have you tried entering the new url with http:// or https:// prefix?
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Check out this mysql generation script, it helped me a lot http://hitautodestruct.github.io/wordpress-db-migrate/
Related
I was editing my WordPress dashboard and I made a type in the site url.
This typo is now causing me to be redirected to a nonexistent domain whenever I try to login through the dashboard.
how can I fix this? I currently have FTP access.
I think the issue is you have entered the wrong domain name in the site URL and home URL.
that's why you are not able to access the website.
For this issue, there are two ways.
1) the First Method
Edit wp-config.php
It is possible to set the site URL manually in the wp-config.php file.
Add these two lines to your wp-config.php, where “example.com” is the correct location of your site.
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
This is not necessarily the best fix, it’s just hard-coding the values into the site itself. You won’t be able to edit them on the General settings page anymore when using this method.
2) Second Method
Edit functions.php
If you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.
FTP to the site, and get a copy of the active theme’s functions.php file. You’re going to edit it in a simple text editor and upload it back to the site.
Add these two lines to the file, immediately after the initial “<?php” line:
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );
Use your own URL instead of example.com, obviously.
Upload the file back to your site, in the same location. FileZilla offers a handy “edit file” function to do all of the above rapidly; if you can use that, do so.
Load the login or admin page a couple of times. The site should come back up.
Important! Do not leave this code in the functions.php file. Remove them after the site is up and running again.
Note: If your theme doesn’t have a functions.php file create a new one with a text editor. Add the <?php tag and the two lines using your own URL instead of example.com:
<?php
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );
Upload this file to your theme directory. Remove the lines or the remove the file after the site is up and running again.
For more details Here I have shared the WordPress org Support Link
If you have access to the database, you can go into PHPMyAdmin, click on wp_options, then search for both home and site_url (or possibly siteurl) and you can change your values there as well. The previous commenter's methods will also work but using functions.php is unnecessary and using wp-config is a temporary fix, in my opinion.
Can someone help when visited in https the error stated that "Not Authorized to View This Page [CFN #0004]" but in Http the site load or work without having an issue?
Reset the URLs to their http version. You can do this via PHPMYADMIN in the wp_options table by locating wp_home and wp_siteurl and adding the http:// version of your website or by adding constants in wp-config.php:
Add these two lines to your wp-config.php, where “example.com” is the correct location of your site.
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Reference: https://wordpress.org/support/article/changing-the-site-url/#edit-wp-config-php
The latter is probably the easiest.
To make your site use https, you must FIRST install a valid SSL certificate. Contact your host for assistance with this.
Credit: https://wordpress.org/support/topic/http-to-https-website-crash/
Move your site from the public folder in your FTP to the secure folder. This will fix the issue.
As of today I cannot make changes in my pages, update my plugins anymore.
Since I only have a .pem file, I have followed this tutorial:
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-password-login/
I created a password for the ubuntu user which is the admin.
I tried logging in using Filezilla and can access using this new password.
I can write into the:
var/www/jimclermonts/wp-content/plugins
Sometimes making changes in a page is not possible and another moment it works again.
open your wp-config.php file and paste following code
define( 'FS_METHOD', 'direct' );
inside it after define( 'DB_COLLATE', '' ); it will solve your problem.
example:
define( 'DB_COLLATE', '' );
define( 'FS_METHOD', 'direct' );
Please I need help on what to do. I edited my url directory to https from http. Now my site is no longer going again. It keeps redirecting to https but i do no have ssl certificate installed yet. What do I do now?
There are four easy methods to change the Site URL manually. Any of these methods will work and perform much the same function. You can read the manual in the wordpress codex for more information
I think the safest is by editing wp-config.php. just add these tow lines:
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
I have moved my Wordpress site, but now when I try to log in to dashboard, it sends me to the old site's domain.
I have tried to search in wp-config.php, but without success
Where can I change Wordpress's domain name?
Add the following to your wp-config.php file.
define( 'WP_HOME', 'http://yourdomain.com' );
define( 'WP_SITEURL', 'http://yourdomain.com' );
Then login to wp-admin. Go to Settings -> Permalinks and hit save.