location of .htaccess in bitnami wordpress - wordpress

i am not able to find the location of .htaccess file in bitnami wordpress. Need to enable content scripting policy in .htaccess file. But this file doesnot exits in nginx bitnami wordpress. Could anyone please help to resolve.

Bitnami Engineer here,
The .htaccess files are used by Apache to modify the configuration of the application per directory. We do not suggest any user use them because of security and performance reasons. However, you are asking about the WordPress with NGINX solution. NGINX doesn't make use of the .htaccess files so if your plugin/theme needs any custom configuration, you will need to include it inside the NGINX conf. There is a specific configuration file for WordPress at /opt/bitnami/apps/wordpress/conf/nginx-app.conf.
I hope this information helps.

Check Here
<Directory "/opt/bitnami/apps/wordpress/htdocs/">
Your code here
</Directory>

Related

How do I get access to my .htaccess files on Google Cloud for my Wordpress Website?

I migrated a website from one web host to another (which is Google Cloud), but I'm having problems changing my permalinks from plain to post name. I want to have the website show the name of the page on the url, but I can't figure out how to get access to my .htaccess files on Google Cloud to see if this is the cause of it.
The error on the website pages are 404 Not Found. But the pages are found if the permalinks are on plain and not on %postname%.
I'm working on a wordpress file.
I tried to change permalinks to %postname% in the wordpress dashboard, but I received an error. I also tried to see if plugins were an issue but its the permalinks needed to be on "plain" setting.
Access SSH: Go to edit your apache .conf
sudo nano /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride ALL <----(edit from none)
Require all granted
</Directory>
Then restart apache2 using:
sudo service apache2 restart
I had the same issue, I hired someone to move a client site (tenwitch.com) to GCP, and when it is time to adjust some little stuffs. I decided to do it myself only to find out that it is not the traditional cpanel I am used to. What you are going to do is download filezilla (https://filezilla-project.org/download.php) and PuTTY, there are tutorial online to follow. You will be able to set it up instantly.

How to move wordpress website from hosting account to localhost

I'm getting 404 error while accessing relative paths on
Wordpress website copied from hosting and deployed locally as Apache vhost.
Local website is basically git clone of the existing remote website.
The following steps were performed to make it work:
DB urls were searched and replaced using wp-cli to be http://local.webiste.com
VHost configured according to apache documentation.
/etc/hosts modified.
So website can be accessed successfully via http://local.website.com.
Media in http://local.website.com/wp-content/uploads/2017 can be viewed successfully.
Though, accessing a Wordrpess page identified by /relative path (relative to current domain/site) causes "The requested URL /relative/ was not found on this server" error.
I'm using the same .htaccess from the remote public_html folder.
How to achive equivalent to hosting behaviour for local vhost website?
Is .htaccess, apache2 configuration, vhost configurations should be changed?
You can use the WP Migrate DB plugin to fix URLs and PHP paths, and them you need to fix the .htaccess file (PHP path) and maybe wp-config.php.
The solution was to allow using .htaccess in /etc/apache/apache2.conf by changing from AllowOverride None to AllowOverride All.
More about it here
So that section related to my local website now looks like:
<Directory /var/www/local.webiste.com/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Allow from 127.0.0.1
</Directory>
Please take a backup through Wordpress Duplicator/All in one migration plugin
For Duplicator plugin kindly follow that https://wordpress.org/plugins/duplicator/
For All in one migration plugin please follow that https://wordpress.org/plugins/all-in-one-wp-migration/
After backup simply you can create a folder in htdocs folder in xampp then create the database in localhost phymyadmin with same name that you have assign to folder
Then further implementation of the backup you can follow the above links please
You can easily move your WordPress website from any hosting to your local host such xampp or wamp server, etc. Follow these simple steps:
Open your WordPress website dashboard.
Install the duplicator backup plugin.
Once it is installed. Take a backup of all of your database files, themes, plugins, and everything.
Open your localhost Cpanel and upload the backup zip file into public.html folder.
Congrats. You have successfully moved your website.
I hope this information will help you. Thanks

Wordpress doesn't update htaccess after change Site Address

how are you doing?
I need some assistance in a huge problem that I tried to solve in many ways and I could not.
I have two separated servers one answering by this url www.mysite.com and another by blog.mysite.com.
The server one aka Site (www.mysite.com) there is a proxy to server two aka Blog (blog.mysite.com).
.htaccess
RewriteRule ^blog/?(.*) http://blog.mysite.com/$1 [P]
The wordpress is installed in the Blog server. When I change the Site URL to responde by www.mysite.com/blog the file .htaccess does not update anymore.
For instance:
I get this Error:
And on W3TC:
So, if I put the Site Address equal to WordPress Address the .htaccess update without problems.
PS: This is not a File Permission problem, the permissions are ok. The user/group are correct.
Wordpress don't have a permission for editing .htaccess.
There're 2 solutions:
".htaccess" file should have same user/group owner with PHP (for example, www-data).
You should give write permissions to ".htaccess." In this case give CHMOD 666 permission for ".htaccess" file.

Wordpress Directory Switch Issues

I recently set up a digitalocean account with wordpress pre-installed. When it is pre-installed, the directory structure begins in the root (var/www/html/). I wanted to change this, so i moved the files into a new directory (/var/www/html/viralnewz) and changed the wp-config files to represent this (they no longer point to the http://178.62.87.202/ but instead to viralnewz.co.uk, which in turn will point to viral newz directory (/var/www/html/viralnewz). This is set up with a virtualhost, and works fine for the front-page and the admin. But when i try and view others pages, i get a 404 not found. I'm assuming theres an issue with the wordpress setup because it can't find the correct page, however i'm unclear how to actually solve this issue.
Apache conf file
<VirtualHost *:80>
DocumentRoot /var/www/html/viralNewz/
ServerName viralnewz.co.uk
# Other directives here
</VirtualHost>
Additionals to wp-config.php
define('WP_HOME','http://viralnewz.co.uk/');
define('WP_SITEURL','http://viralnewz.co.uk/');
If i've missed any other information that could be beneficial, please mention it and i'll do my best to find it.
Chris
I think your problem can be related to url values stored in DB.
You can migrate safely using this tool, that permit to find and replace the urls stored in DB.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Can be also necessary update .htacess file: normally is enough enter in permalink settings and save again the structure of permalinks.

Bitnami wordpress htaccess.conf setup

I am using xampp to develop a wordpress site using bitnami application installer all is fine at the moment except that there is no .htaccess file but instead they are using a htaccess.conf file. would i be able to create a .htaccess file in order to allow .svg mime type? or is there a way to do that with the htaccess.conf file?
I appreciate the help :)
Bitnami developer here:
One of our main goals is to configure Bitnami applications in the most secure way. For this reason, we moved the configuration in the ".htaccess" files to the main application configuration files and set the "AllowOverride" option to "None" by default.
In this case, you have two options:
Set the AllowOverride directive to All in xampp_dir/apps/wordpress/conf/httpd-app.conf and use the .htaccess files.
Use xampp_dir/apps/wordpress/conf/htaccess.conf with the content of the .htaccess files that you have.
I hope it helps.

Resources