If it’s a standard WordPress .htaccess
file that won’t be your problem. I’m willing to bet you forgot to change the Site URL values when you imported the database.
You can either edit it in the options table in your database or even in your wp-config file by adding
define('WP_HOME', 'http://mainwebsite.com/test');
define('WP_SITEURL', 'http://mainwebsite.com/test');
to it. You can read more (or other ways to do it) here: https://codex.wordpress.org/Changing_The_Site_URL
Related Posts:
- WP install in sub-dir white screen
- WordPress installed in root, need second in subdirectory with different domain
- Install second wordpress in root subfolder, Error 404
- File and directory permissions
- Permalink Issues by Installing WordPress in Subdirectory / Subfolder
- Place static HTML files in path below WordPress page
- .htaccess for wordpress inside another wordpress install
- Isolating WordPress to a subfolder
- Permalinks not working on second wordpress installed in a subdirect
- Move wordpress to folder without changing urls
- Change wp-content without changing the name of the folder
- How to restrict access to wp-content, wp-includes and all sub-folders
- Two domains on one WordPress Installation
- Redirect main domain to subdirectory
- Exclude subfolder from WP-redirect works with html but not php files
- Giving WordPress its own subdirectory – nginx
- WordPress On subfolder
- Can’t Access Subdirectory
- Fixing custom 404 pages broken by WordPress in a subdirectory
- Drawbacks to using Options -Indexes
- subdirectory install breaking existing links
- htaccess, site and staging in subdirectories
- External content won’t load in iframe in Safari
- Disable directory browsing of uploads folder
- I have a page using a pretty url and a mod_rewrite rule matching it. I expected it to give an error but it’s working. Why?
- Access sub-domain when root public_html is protected with .htaccess password
- Cannot access subdirectory subpages
- How to execute WordPress as though it is in the root folder while it is installed in a subdirectory?
- WP Codex answer incomplete? Put WP in subdirectory. .htaccess change required
- Remove subdirectory from links
- How to properly give WordPress its own directory
- htaccess- to hide subdirectory slug only from the post
- How to direct users to a subcatalog
- Installing wordpress on subdirectory 2 levels down
- Cannot Override WordPress 404 for a Sub-Directory
- htaccess mod_rewrite not working
- .htaccess and virtual host configuration for WP in its own directory
- Giving WordPress it’s own directory and using .htaccess Directory Index
- Static raw HTML page
- .htaccess file redirecting to parent directory
- WordPress in sub directory wp-admin problem
- Rewrite rule not working
- Correct htaccess to display page while also passing in GET parameters
- Using “wordpress_logged_in” to restrict direct access to uploads folder in 2021
- Temporary .htaccess blocking is disabling WP Crons from running?
- .htaccess redirects disappeared after re-saving permalinks
- WordPress multilingual website domain and folders
- Attach to wp-login.php and xmlrpc.php
- XMLRPC filtering through htaccess not working
- Corrupt .htaccess file
- Cache policy not updated according to PageSpeed
- Why does chrome keep downloading a file instead of running the site?
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- What’s the opposite of required valid user in .htaccess authentication
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- When is it necessary to have Header unset Vary in .htaccess
- Redirect http to https does not work on subdir where another instance of WordPress installed
- redirect the homepage using .htaccess outside of WordPress
- Https Redirect infinite loop in Mobile browsers
- 403 error on admin login page
- Correct folder permissions?
- Redirect an old link to new site homepage [closed]
- .htaccess rewriting old RSS feed URL to WordPress feed URL
- How can I set Cache TTL for woff and woff2 font files with htaccess?
- How can I fix the redirect chain after implementing ssl on wordpress?
- How do I configure wordpress structure for development using git and composer
- subdirectory index.php is not working
- How to create a redirect in the .htaccess file, with 2 exceptions
- My Homepage Suddenly Disappeared and I Can’t Get It Back
- Is there a directory my plugin can write files to that cannot be viewed via the browser/url?
- How to turn this .htaccess rule into a dynamic rule with add_rewrite_rule, et al?
- Local PC cache stays filled with old WordPress Site data
- .htaccess Non-‘www’ to ‘www’ Subdomain Redirection Only Works for Homepage
- .htpasswd asking for authentication on home page
- Non WordPress Folder in a WordPress Site
- Htaccess rewrite based on query string, not working [closed]
- Redirect all subdomains to root domain
- Change root directory
- Htaccess maintenance page rules that actually work with WordPress?
- How to allow only vpn access to dashboard on Bitnami WordPress by IP address restricting
- Should I prevent access to .htaccess and wp-config.php files?
- Blocking wp-login in HTACCESS has also blocked password protected pages
- htaccess redirect to path
- Non-wordpress subdomain on Multisite Installation
- Unable leverage Browser Caching on AWS Bitnami stack (Apache) through W3TC and Cloudfront CDN
- Clicking PUBLISH Now Redirects to 404 PAGE NOT FOUND
- Rewrite rules and maintain URL
- Subfolder renaming
- Resource 404 error on multisite subdirectory install
- Targeting .htaccess file with file_put_contents
- Redirect Loop in Regex Moving to HTTPS
- .htaccess file changes disappear
- Fresh wordpress installation in sub-directory not accessible
- Need to edit htaccess while moving on WordPress
- WordPress login bug. Need an emergency solution
- How can I create a private site that is inaccessible from the outside?
- 403 forbidden due to .htaccess?
- How to rename the WordPress wp-login.php running on IIS6?
- Where is the htaccess in wordpress.com hosting?
- Debug errors for “Destination directory for file streaming does not exist or is not writable”