Want to learn which template files in a theme are used to display different pages? See our visual guide to WordPress template hierarchy (cheat sheet).
Wondering what is rel=”noopener” in WordPress? In this guide, you’ll learn what is rel=”noopener” in WordPress and how does it impact your website.
Starting a blog for the first time can be a nerve-wrecking experience. There’s a lot of excitement, but at the same time there’s a fear of unknown. You want to do everything the RIGHT way and avoid all major pitfalls, so your blog can be successful. In our 12+ years of blogging, we have made countless mistakes and learnt from them. Over the last decade, our blogs have received well over a billion pageviews. In today’s article, we will share the “expert tips” that we wish we knew before starting our first blog.
The ultimate collection of the most useful WordPress configuration (wp-config.php) tricks that you may need but do not know about!
Changing Your Site or WordPress Address
Normally, you can set your WordPress and Site URLs from Settings » General page. However, you may not be able to do that if you don’t have access to your WordPress site, seeing redirect errors, or have just moved your site.
In that case, you can change your site and WordPress URLs via wp-config.php file by adding the following lines:
Moving wp-content Directory
WordPress allows you to move your wp-content directory. Some experts believe that it can help strengthen WordPress security.
You will need to add the following code to your wp-config.php file:
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );
define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');
define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );
define( 'WP_PLUGIN_URL', 'http://example/blog/wp-content/plugins');
Don’t forget to replace example.com with your own domain name.
I wonder if this would allow me to better integrate my ‘home’ space and have a shared content / plugin library between my different sites?