• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Can not access my wp site

Dedra

Member
May 4, 2022
56
12
8
Hi there
I can not access my wp site after I moved a wp site form a subdomain folder to another subdomain folder, change the siteurl and home in database and deleted the rocket cache folder.
I need your precious help.
 
Hi there
I can not access my wp site after I moved a wp site form a subdomain folder to another subdomain folder, change the siteurl and home in database and deleted the rocket cache folder.
I need your precious help.
Can you provide a screenshot of the error that appears when you access the web site
 
Problem is, if you have done this manually all the subdomain links moved the same, your best bet is to use all in one migration plugin to backup and restore, otherwise you have many sql data to fix from subdomain to domain etc..
 

This page isn’t working​

sub.domain.com is currently unable to handle this request.


HTTP ERROR 500
 
reverse the process first, login to the old sub domain install all in one migration plugin and take a full backup and restore it to a new installation on the new subdomain.
 

This page isn’t working​

sub.domain.com is currently unable to handle this request.


HTTP ERROR 500
Make sure the configuration is correct, such as DNS etc
 
Problem is, if you have done this manually all the subdomain links moved the same, your best bet is to use all in one migration plugin to backup and restore, otherwise you have many sql data to fix from subdomain to domain etc..
Yes I have done this manually for 4 subdomains, two of them work just fine but the other two don't.
The problem with the migration plugin is that the main domain has expired and can not install any plugin.
 
You can technically install the extension on the working sub domain, do the backup and restore it.
 
The wp-config.php file is a critical file of your WordPress installation, and just like we did in the previous step, we need to make some changes that reflect the domain name change.

Download the file and then open it in a text editor. Replace the database name, user, password, and host details with those of the new database you made in Step 4. Specifically, add the correct parameters for the following functions:

define('DB_NAME', 'new database name here');
define('DB_USER', 'new MySQL database username');
define('DB_PASSWORD', 'password for the new database');
define('DB_HOST', 'new MySQL hostname');

Next, add the following lines of code at the top of the file (below the comments), replacing “newdomain.com” with the correct domain of your site. For this example, the correct parameter would be “https://mybhsite.com”.

define('WP_HOME', 'http://newdomain.com');
define('WP_SITEURL', 'http://newdomain.com');

Add two lines to the wp-config.php file.
 
Last edited:
htaccess file

# BEGIN LSCACHE
# END LSCACHE
# BEGIN NON_LSCACHE
# END NON_LSCACHE
#This Apache config file was created by Duplicator Installer on 2021-04-05 17:10:06.
#The original can be found in archived file with the name .htaccess__[HASH]

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
 
congig file does not have any domain pointer.




<?php
define( 'WP_CACHE', false ); // Added by WP Rocket


/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @Link https://wordpress.org/support/article/editing-wp-config-php/
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', "......" );
/** MySQL database username */
define( 'DB_USER', "........." );
/** MySQL database password */
define( 'DB_PASSWORD', "........" );
/** MySQL hostname */
define( 'DB_HOST', "localhost" );
/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define( 'AUTH_KEY', 'put your unique phrase here' );
define( 'SECURE_AUTH_KEY', 'put your unique phrase here' );
define( 'LOGGED_IN_KEY', 'put your unique phrase here' );
define( 'NONCE_KEY', 'put your unique phrase here' );
define( 'AUTH_SALT', 'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT', 'put your unique phrase here' );
define( 'NONCE_SALT', 'put your unique phrase here' );
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the documentation.
*
* @Link https://wordpress.org/support/article/debugging-in-wordpress/
*/
define( 'WP_DEBUG', false );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
 
Search for debugging WordPress, also check out your server logs to see the exact issue.
 
If you want to move a Wordpress website from on domain to another domain
use the pro version of updraftplus you can find the latest version here

on sub1.my domain.com install the plugin and do a backup of the website

on sub2.my domain.com install a fresh version of Wordpress 6.03 with the updraftplus plugin installed as well

upload the backup file within the updraftplus plugin and restore your site onto the new sun domain it will advice you that the domain is wrong and it will search and replace veering for you

this is how I make and move my Wordpress site from my staging domain to a production domain and everting works perfectly
 
As I mention above I do not have access to my first subdomain since it has expired, so it is not possible to install a plugin.
 
What I just did was to export the database file, import it with the notepad++ and find and replace all sub1.domain.com to sub2.domain.com but did not worked.
 
Please check the database prefix, 1 hour later if you wish, I can check it via private message. ^^
 
What I just did was to export the database file, import it with the notepad++ and find and replace all sub1.domain.com to sub2.domain.com but did not worked.
so I did what you said you tried I searched and replaced all instances of my production domain in my database and replaced it with my test domain I also uploaded all the files within the new domain / host

the main things to change is

// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'test' );
/** Database username */
define( 'DB_USER', 'root' );
/** Database password */
define( 'DB_PASSWORD', '' );
/** Database hostname */
define( 'DB_HOST', 'localhost' );


SQL file
under options

siteurl = new domain
home = new domain

the website still redirected to the production domain so I opened it on chrome in Cognito mode and it worked fine
also in my main web-browser I entered this http://newdomain/wp-login.php and it took me to my new domain
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock