Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRachel Makovoz
5,005 PointsWordpress - local to live- Internal Service Error
Hello, I'm trying to transfer my WordPress from a local to a live server. When I copied all the files to the FTP I only can view my home page, but all the images are missing and when I try to click to any other pages on the site it gives me an "internal service error".
Please let me know what I should do - I've been stuck on this issue for a while!!!1
Thanks so much in advance.
Rachel
2 Answers
Greg Kaleka
39,021 PointsHm... I went to your site and the links look fine. It's not the issue I originally expected. Doing a bit of googling, it looks like it may be your .htaccess file.
Check out this discussion in the WP forums. Might help you.
Greg Kaleka
39,021 PointsHi Rachel,
This is probably to do with how your links are written. Do you have a config.php file or something like it where you define your web root? You'll need a different base URL and document root on your live server versus your local one.
Could you post some code here? At a minimum, your home page's index.php, and if you have a config.php, that as well.
Best,
Greg
Rachel Makovoz
5,005 PointsThis is my index.php file:
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
And this is my config.php file
/** The name of the database for WordPress */
define('DB_NAME', 'doeremix_lamaze');
/** MySQL database username */
define('DB_USER', 'doeremix_rachel');
/** MySQL database password */
define('DB_PASSWORD', 'shirasima');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
define('WP_HOME', 'http://rachelwebdesign.com');
define('WP_SITEURL', 'http://rachelwebdesign.com');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'j>-lkG/$1.-r_2c =0_N0 Tqa(ydR.C.;}>TPm)_W)+Dc0r}%-OW!AB ?Bdoq/T&');
define('SECURE_AUTH_KEY', '%^/?<AUbAB-o{X3r$+Lf|Z(?UB@p1zSIr+v!X+uCp4uh<]>-K99~+r}#_<lsUbjD');
define('LOGGED_IN_KEY', 'n*+ fKZX1;2ien$2{1+MX][j0SgnM`i91+wFW4.sczq!:{f=WnKB_p-T=||sP$d?');
define('NONCE_KEY', '#8U{4|)gt--#UhAr{Ge#91lp<R<5AzNo&vQ9`WPNZR_VRoEZ ~OD{wOtdI/$q@-+');
define('AUTH_SALT', 'e>+LRymj!PDuPQxQv*r-f-_9u8yegsMBbx=eE,=G8CuDdJaE3`fjRH4n|Eq_ksC7');
define('SECURE_AUTH_SALT', 'jkP+adNy:vwj=)F#L;DtEY70vEsh||sj$Aqi!EIAqP%-zS E@+DFZ@)8-x?AaV5|');
define('LOGGED_IN_SALT', '?,=2T8u+i`-:m]z--}+2@Q>$eZZg?|f.Bvrx|D&s7!&2mFB 3oKzUZNW#cl=uHK');
define('NONCE_SALT', ':Bop-Y{Y4+#,odU+I3{E]x$oT@(Z_P|Sy*gb)2Rb81>X>*I*?B %^zg!#{aSjAj(');
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = '_2';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Thanks!
Rachel Makovoz
5,005 PointsRachel Makovoz
5,005 PointsI forgot to mention that I delteed my htaccess file to see if that helped, but I never brought it back. I just put the .htaccess file back - but I still have the same errors
This is what my .htaccess file looks like right now:
This is the error that comes up when I try to go to other pages:
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsI would try the suggestion about changing permalink settings, since it seems like that rebuilds the .htaccess file.
Rachel Makovoz
5,005 PointsRachel Makovoz
5,005 PointsHow do I do that?
Rachel Makovoz
5,005 PointsRachel Makovoz
5,005 PointsI changed the permalink settings to default - and now all of the other pages are working!!!! Still, all the images are not showing up - probably a linking issue - how do I fix that?
Thanks!
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsNice! Glad that fixed that issue.
Yes, the images are a linking issue. Here's one of them:
<img class="alignnone size-full wp-image-230" src="http://localhost/lamaze.com/wordpress/wp-content/uploads/2015/07/class.png" alt="class" width="64" height="64">
I'm sure you see the problem :). I'm not a wordpress expert, so I'm not sure how the img tags are generated... if you're hard-coding the src attribute, you'll want to make sure you're using PHP to use the document root (which is different live vs local), rather than hard-coding in "localhost".
Rachel Makovoz
5,005 PointsRachel Makovoz
5,005 PointsAnother weird thing I just noticed is that the other pages show up - but when I go to edit those pages - the text editor is completely empty...