I had a demo environment set up in /subdirectory/
and then moved it to my root directory to make the site live.
- Used the wp migrate db plugin to export my database with the new paths, then replaced all the database tables with my new export.
- I did a search and replace in PHPmyAdmin and replaced
/subdirectory
with/
, just to make sure nothing was missed. - Copied all the content from
/subdirectory
to my the site's root
Upon doing this, my site worked at the root URL, however, I noticed that the bloginfo('template_directory');
and get_template_directory_uri();
functions get the old URL! (/subdirectory/wp-content/themes/my-theme/
).
If I remove the /subdirectory/
files, the site doesn't load (I just see a blank page).
I went to my index.php
to check on where wp-blog-heaer.php
was being loaded from, making sure that it was referencing my root directory.
I also added
update_option('siteurl', 'http://www.mysite.com' );
update_option('home', 'http://www.mysite.com' );
to both wp-config files.
I even used the Search and Replace Database Script recommended in the Wordpress Codex to make sure I didn't miss anything in the database like serialized strings.
Can't decipher why my site still thinks that it's in the old URL. Any ideas?
edit: My root .htaccess seems fine also. No mention of /subdirectory
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
wp-config
files?