0

So I just moved my website from localhost (127.0.0.1/wordpress) to a server. I followed many tutorials and I managed to get the site going. The home page loads, the content is there, however, subpages and css don't work/load. (the home page is blank, without any css applied).

Apparently, the problem is in MySQL database. I tried multiple times to replace 127.0.0.1/wordpress with mydomain.com, but nothing seems to be working. No matter what I change those values to, all the links are mydomain.com/wordpress.

Any idea how to fix this?

3
  • 1
    Did you changed the homepage url and wordpress url in database?
    – Sisir
    Commented Aug 2, 2013 at 18:34
  • Exactly what links are you talking about? Do you have the local address hard coded into any files?
    – s_ha_dum
    Commented Aug 2, 2013 at 18:35
  • Yes I've changed that. Essentially every link on a webpage. What I did recently is that I created a wordpress dir on FTP server and move stuff there, but now people would have to input mydomain.com/wordpress to access my webpage, which is clearly not the way I want it. Commented Aug 2, 2013 at 18:41

1 Answer 1

0

I can't tell exactly what you are asking but this comment...

What I did recently is that I created a wordpress dir on FTP server and move stuff there, but now people would have to input mydomain.com/wordpress to access my webpage...

... makes me wonder it you don't have a subdirectory install. If that is the case, you need to follow the instructions in the Codex to get this working.

  1. Go to the General panel.
  2. In the box for Site address (URL): change the address to the root directory's URL. Example: http://example.com
  3. Click Save Changes. (Do not worry about the error message and do not try to see your blog at this point! You will probably get a message about file not found.)
  4. Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress (wordpress in our example) directory into the root directory of your site—the latter is probably named something like www or public_html. The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you'll have a web.config rather than a .htaccess file in your WordPress directory.
  5. Edit your root directory's index.php.
    1. Open your root directory's index.php file in a text editor
    2. Change the line that says:
      require('./wp-blog-header.php');
      to the following, using your directory name for the WordPress core files:
      require('./wordpress/wp-blog-header.php');
    3. Save the file.
  6. Login to your site (if you aren't still already). The URL should still be http://example.com/wordpress/wp-admin/
  7. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can't write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)
3
  • I can't change the Site adress in the box. It's shaded. Commented Aug 2, 2013 at 19:17
  • Then the Site address is probably hard-coded into the wp-config.php file: codex.wordpress.org/…
    – s_ha_dum
    Commented Aug 2, 2013 at 19:32
  • Yeah. Changed it there and it works! Sorry for a late reply. Commented Aug 2, 2013 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.