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.
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.
I want to change WordPress Address (URL) and Site Address (URL). after a few experiments unfortunately using wp-admin or even changing it on phpmyadmin wordpress cannot be accessed.
What I have tried:
1. I try to change the URL in the general settings of the wordpress is still redirecting to the old url & page 404 not found.
Then I try in the same config.php it can't be 404
I change it in phpmyadmin (db) in the same wp_option it can't.
Please help, thanks, in advance
I want to change the url as follows:
https://example.com/spm to https://example.com/
There are several ways to do this:-
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' );
OR
Change WordPress URL Directly in Database
In phpMyAdmin, click on your database on the left-hand side. Then scroll down and click on the wp_options table. If your database has a different prefix it might be named slightly different, such as wp56_options.
Thank You everyone, my issue solve finally.
the problem is my wordpress in subfolder on host. so when i want to change for example to root url or something else.
Move the root wordpress to public html
Move the wordpress file to Public html
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' );
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/
I recently installed openlitespeed wordpress on one droplet and configured the domain/listener/SSL etc according to its documentation. When I visit the site thru IP address, it looks fine. But when I visit the site thru the domains, things are weird:
when visited from the ip: 206.189.134.87, and the domain with www: www.gudianjita.xyz, the site is not secure but the style is fine. when visited from the domain gudianjita.xyz, the site is secure but the style/css are gone.
I am not sure what had happened. If anyone can give me some plausible reasons to check into, that will be great. Also, if additional information about any settings can be helpful to debug, I would be happy to share. Thanks!
It seems that you installed your wp using the ip address. So the values of site_url and home_url options in the wp_options table are 206.189.134.87.
You can change it by updating the rows in wp_options table or just add these lines to the wp-config.php:
define( 'WP_HOME', 'https://gudianjita.xyz' );
define( 'WP_SITEURL', 'https://gudianjita.xyz' );
Goodluck 😉