How to configure a new WordPress site correctly
We are here to help!
JungleWP offers you peace of mind that our support will help you set up your WordPress installation. Remember we are just one email away from you.
After migrating your WordPress site or creating a new site, you might some problems with your page loading correctly or your image library not displaying thumbnails. This is the result of your website's .htaccess file missing and wp-config being misconfigured.
Some errors include:
- the loss of permalinks.
- the disabling of some caching plugins, and
- the disabling of some security plugins.
- Library preview thumbnails not displaying.
- Mixed content errors (content displayed in http while the site is using https)
If you are getting any of these errors, follow these steps:
First, open your SFTP client and change the setting to show hidden files.
In Cyberduck, for example, open the Browser settings in the program preferences. Make sure a checkmark is placed next to Show hidden files.
Then, open two windows within your SFTP client: one for your old server and one for the new server.
Now, drag your .htaccess file from the website's web root directory on your old server to the website's public folder on your new server.
Click Refresh in your new server's SFTP window, and your site should now load correctly.
If you don't have a .htaccess file you can generate a new one from your WordPress Admin Dashboard:
- Click on General => Permalinks
- See what your current permalink settings are
- Depending on your current settings, select a different permalink option ( IE: if you are set to Post name, select Default.)
- Click Save Changes
- Now that your changes have saved, select the original Permalink setting (WordPress recommends choosing Postname for SEO reasons)
- Click Save Changes
- Check to see if your .htaccess is created.
Add the server directives WordPress needs
Let's Create a .user.ini file that contains the directives your WordPress Site will need right next to the .htaccess file in your website's web root directory on your new Pod (server).
max_execution_time= 1900 upload_max_filesize= 500M post_max_size= 500M default_socket_timeout= 1800 memory_limit= 500M
Now let's add the correct WP-Config Settings:
NOTE
You must insert this BEFORE /* That's all, stop editing! Happy blogging. */
in the wp-config.php file.
// If we're behind a proxy server and using HTTPS, we need to alert Wordpress of that fact // see also http://codex.wordpress.org/Administration_Over_SSL#Using_a_Reverse_Proxy if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { $_SERVER['HTTPS'] = 'on'; } // we use dynamic host define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']); define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);