Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So I switched servers from localhost:8080 to a domain, now I followed the instructions by updating the config, and updating the permalinks and everything. Even updated the database. I can go into my admin control panel fine and all, but when I view the site, all the PHP code is not working or something. I see the layout of the site, the CSS being included, but things like wp_head() aren't working. The source is all the basic HTML from the layout, none of the PHP code is working. I click on links in the menu, which are permalinks, and they don't go anywhere, nothing happens. The logo isn't working or anything either. I don't know what else to try, so if anyone has any ideas that would be appreciated.

share|improve this question
add comment

1 Answer

If you can access your sites database via phpMyAdmin, follow these steps to check that the links and images aren't "hard-coded":

  1. Navigate to your hosting account/phpMyAdmin
  2. Find the database and click on it to select it
  3. From the top toolbar click on Export
  4. In the export window select all tables by clicking the first one in the box that contains your tables, hold down shift and click on the last one in the list (they should now all be selected).
  5. Depending on the phpMyAdmin version you might need to ensure download sql file is selected Use Notepad++ or the editor of your choice to open the file (I recommend NotePad++ for SQL files since many IDE's can be a little sluggish with large SQL files).
  6. Once the file is open in NotePad++, search for the old domain name (http://localhost:8080, or whatever it was) and choose find all.
  7. Use the find dialog box to replace the old URL with the new. EXAMPLE: http://localhost:8080/wp-content/themes/yourtheme/images/logo.png might show up, you would only type http://localhost:8080/ in the find box and http://www.your-new-domain-namehere/ in the replace dialog box then click replace all.
share|improve this answer
    
Already replaced all of them, still not working –  change Feb 10 '12 at 1:17
    
Can you give a few more examples of "the PHP isn't working". I'm not 100% sure what is broken. –  Jeremy Jared Feb 10 '12 at 1:19
    
It appears that your menu links aren't working because they have the links set as a href="#". –  Jeremy Jared Feb 10 '12 at 1:30
    
now look at it, its supposed to include the images, css, and js from the current theme folder, when you just saw it, it was because i had duplicates of those folders. for example <?php bloginfo('stylesheet_url'); ?> doesnt, work, and yes I checked php i have php5.3 installed –  change Feb 10 '12 at 1:34
    
Has the current server or hosting account ever hosted a successful WordPress site? If so, try going to WP-Admin and click on Dashboard, then click on updates. If you have the current version click on update anyway. Sometimes files can become corrupt and WP needs to be re-installed. –  Jeremy Jared Feb 10 '12 at 1:35
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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