Reputation: 877
My WordPress themes are not working. My WordPress is 4.9.3, everything was working fine until the server admin moved the directory. So I basically, edited the DB home and site URL values, and the website is functioning, except the themes. All of them I even tried the Twenty FifteenVersion and it's not working too. What is not working exactly is the CSS, although when I check through to inspect if the files are loaded, and when I download them they are correct. So the themes are sort of HTML only and messed up. I checked/corrected the file permissions, and still, it's not working.
Upvotes: 0
Views: 828
Reputation: 67778
You need to open the exported Database SQL file in an editor and find/replace every instance of the previous URL with the new URL (i.e. http://www.your_new_domain.com/ replacing http://www.your_old_domain.com/. Then transfer it to the new server.
The reason: Wordpress saves all URLs / links etc. with absolute filepaths in the database. These filepaths need to be changed in order for the site to work on another server.
Plus you need to make sure the settings in the wp-config.php
file are updated (mainly server access settings)
Upvotes: 0
Reputation: 220
When you move your WP to another folder, you have to change de the post content too. You can do that with this:
UPDATE wp_posts SET post_content = REPLACE(post_content, 'www.old.com', 'www.new.com');
Please! Make a backup first ;)
Also make sure your Permalink is ok:
Go to Settings » Permalink and click Save Changes to ensure that all post links are working fine.
Good luck! :)
Upvotes: 1