I would like to move my wp-content folder to Amazon S3/CloudFront.
I copied the folder to an S3 bucket.
I am in the process of editing the wp-config.php file in order to tell it where to find the moved wp-content folder.
But I am unable to find out which URL to link to?
Do I link to S3 or to CloudFront?
And where do I find the link that I need to enter into wp-config.php?
In order to store the files on S3, you will need to change both the directory location and the URL WordPress renders.
You will need a tool that can map S3 as a local mapped network drive. Check out FUSE or TNT Drive. Create a new network drive mapped to S3 using one of these tools.
Include these lines anywhere above the line where WordPress includes the wp-settings.php. Inside your wp-config.php file:
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/Mapped/S3Folder/ToBucket/wp-content' );
define( 'WP_CONTENT_URL', 'http://www.domain.com/blog/path/to/wp-content' );
Related
I got my wordpress files in /var/www/html/ but I would like my wp-config.php file to be in a mounted volume in /app/config/ for security reasons.
I cannot mount the volume directly like this /app/config/wp-config.php:/var/www/html/wp-config.php because I'm mounting it via AWS ECS and for some reasons I only can mount directories...
Which wordpress files should I modify to make it search wp-config.php in /app/config/ ?
Thank you !
It looks like you need a wp-config.php file in /var/www/html that simply contains nothing but the following:
<?php
include(‘/app/config/wp-config.php’);
?>
I am trying to change the default path of the WP default directories such as wp-content, wp-include etc to avoid wpscan.
I have tried using plugin would it possible to perform the same using manual techniques. I am using apache as a web server.
An example, I have tried:
RewriteRule ^cms_plugins/(.+) /wordpress/wp-content/plugins/$1 [L,QSA]
Thanks
Try the following steps to rename WP-Content Folder
Download the WP-Config.php file
Open and Edit the Wp-Config.php file to add the below line
define( 'WP_CONTENT_FOLDERNAME', ‘new_directry_name’ );
Change 'new_directory_name' to the name you want for your content folder.
Upload WP-Config.php file back to your server
Follow these steps to replace the WP_Content folder
Download WP-Config.php file
Open and add the below lines
define( 'WP_CONTENT_DIR', ‘new_directry_local_path’ );
define( 'WP_CONTENT_URL', 'http://new_directry_url' );
Change new_directory_local_path and http://new_directory_url to your local path and URL.
Upload back to your server
i have WordPress installed in the root http://ibdaa.info
what a need to do is to make sub-directory likee: http://ibdaa.info/app and upload my website to this sub-directory its contain (html,css,js)
i make try to just upload my site to previous link but it seem doesn't work
You will have to upload all the files present in the root folder of http://ibdaa.info to http://ibdaa.info/app and then change the site_url and the wordpress_url from the backend to the new url which in case is http://ibdaa.info/app and you will have to change the new url to point to the /app directory in the .htaccess file also.
A similar way would be to define constants in the wp-config.php file with the new url's
define('WP_HOME','http://ibdaa.info/app');
define('WP_SITEURL','http://ibdaa.info/app');
Usually all the wordpress themes are uploaded and saved over the server say http://example.com/wp-content/themes/ . I am developing a plug-in to change this path to something like http://xyz.com/themeFolder/ . So i have to develop such a functionality where my wordpress installation will be on one server and the themes and plug-ins folders will be on another server.
Any help, will be highly appreciated.
Thanks in advance to all the genius people out there :)
Since Version 2.6, you can move the wp-content directory, which holds your themes, plugins, and uploads, outside of the WordPress application directory.
Set WP_CONTENT_DIR to the full local path of this directory (no trailing slash), e.g.
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );
Set WP_CONTENT_URL to the full URI of this directory (no trailing slash), e.g.
define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');
SOURCE
Do not forget to check THIS page as well.
I'm wondering how I would rename the 'themes' folder in the wp-content. I've renamed my wp-content folder and the actual active theme folder name, but I'm after renaming the folder the themes are stored in.
/wp-content/themes/themename
the middle one lol.
Does anyone know how this would be achieved?
The following will enable the directory "t", in the root of the site, to be used as an extra Themes directory
register_theme_directory( '/www/htdocs/username/public_html/t' );
I think you'd like this thread: Steps to Take to Hide the Fact a Site is Using WordPress?
This is usefull if you want to keep plugins and uploads in ex. separate server for CDN purpose (NFS) and remove public/www permission. In this case you only deploying themes instead of plugins, uploads etc.
define('WP_CONTENT_DIR', __DIR__ . '/data/wp-content');
define('WP_CONTENT_URL', 'http://{your-url/to-blog}/wp-content');
define('WP_PLUGIN_DIR', __DIR__ . '/data/wp-content/plugins');
define('WP_PLUGIN_URL', 'http://{your-url/to-blog}/wp-content/plugins');
$wp_theme_directories = array(__DIR__ . '{/directory-to-themes}');
define('WP_DEFAULT_THEME', '{your-default-theme}');
Remember:
1. Order of lines in wp-config is important
2. Keep themes folder in wp-content (even if it will be empty)