-1

I have created my own theme which works just fine locally, but when I try to migrate it to a live server the links break.

I've gone through the usual channels: permalink changes, database search & replace using new url, plugin deactivation etc etc, but no joy. It works fine with bog standard themes so I know the theme is the problem and not the database, but just can't pinpoint where the problem is. I've searched through the functions file but can't see any problems there either.

I've created themes before and never had this issue - I've looked through other questions but not found a resolution. Anyone else experienced this?

EDIT:

After adding

error_reporting(E_ALL); 
ini_set('display_errors', 'On');

to wp-config.php

The following error was seen:

'Parse error: syntax error, unexpected end of file in /home/museumweb/public_html/wp-content/themes/museum/page.ph‌​p on line 40'

Which has been fixed now.

tousif
  • 749
  • 2
  • 12
  • 31
Gerry
  • 1
  • 1
  • What is the error presented by server? It can be the php version of the server, but without seeing the error it's difficult to guess. – Felipe Elia Mar 08 '16 at 15:13
  • Put `error_reporting(E_ALL); ini_set('display_errors', 'On');` in your `wp-config.php` and your server must show more details of the error. – Felipe Elia Mar 08 '16 at 17:00
  • Aha, that's given me a clue, thank you! I'm getting back 'Parse error: syntax error, unexpected end of file in /home/museumweb/public_html/wp-content/themes/museum/page.php on line 40' ... will start trawling through my page template to find the error. Thank you very much – Gerry Mar 08 '16 at 17:29
  • I've fixed it - can't thank you enough for that simple bit of code, could've saved myself a whole day with that! Ah well, will come in useful next time, a million thanks again Felipe Elia – Gerry Mar 08 '16 at 17:54
  • I've made an answer for those will reach your question with a similar doubt. Check that as accepted if you can ;) – Felipe Elia Mar 08 '16 at 18:45

1 Answers1

0

For general server 500 errors, always try adding:

error_reporting(E_ALL); 
ini_set('display_errors', 'On');

to your wp-config.php file. After solving don't forget to remove it ;)

Felipe Elia
  • 1,398
  • 2
  • 12
  • 24