Wordpress permalink settings broken - wordpress

When I choose /%postname%/ permalink it adds a base directory (home-2) to the link like
Before:
site.com/?p=123
After:
site.com/home-2/page
I want it to just be site.com/page.
Update: I see now that all permalink options give me the same link site.com/home-2/page even if I choose Month and name or any other setting.
If I type in site.com/page it redirects to site.com/home-2/page

Select Custom structure, and then put /%postname%/ in the input box. Also make sure you don't have anything in the category or tag base input boxes under "Optional". Click save and see if that fixes your issue.

I solved this issue for myself: I was running MAMP locally for wordpress. However, I had NGINX in the Procfile (not apache clearly; that's the A in MAMP). I also was running HHVM on heroku and PHP (the P in MAMP) locally. once i changed my composer.json to:
{ "require": { "php": "^5.5.12" } }
and my Procfile to:
web: vendor/bin/heroku-php-apache2
and redeployed, /%postname%/ permalinks worked!
In hindsight, if I was paying attention to this: http://12factor.net/dev-prod-parity, I would have resolved this a lot sooner.

Related

500 Error after changing wordpress prefix

I changed the Wordpress database prefix with iThemes Security from the default wp_, but now it gives always 500 Error at loading the site :-(
I checked the database, and wp-config, and they seem to match, the plug-in changed the prefix correctly, also, I deleted the .htaccess file and removed the plugin from the wp-content folder.
Any idea how could I get the site back?
I carefully checked now my wp-config.php file and it was truncated, missing the end of the file (from languages defining), so I restored it from the sample, and it works now!
It was some mistake while the file was updated on the server (momentary interruption?).
Thanks.

Bitnami WordPress for OSX: Install in Root Directory

Using Bitnami WordPress installer, I want to install WordPress in the root directory, instead of /wordpress directory.
(Or rather, move the WordPress website to the root directory after the installation.)
I attempted to follow somewhat dated instructions I found here:
http://bitnami.com/forums/forums/wordpress/topics/installing-to-root-folder-not-sub-folder
But I couldn't even complete the very first step because URL settings are grayed-out in the Settings panel. Also, the DocumentRoot value is very different from what is described. I think it's because the WordPress has greatly changed since 2010.
Could someone knowledgeable please help with this?
Wordpress hasn't changed much since it was initially released 10 years ago or whenever it was.
Currently: Wordpress is installed in var/www/html/wordpress/[all the wp files are in this folder]
You want: Wordpress to be installed var/www/html/[all the wp files are in this folder]
1: Via ssh or ftp copy the files
From: var/www/html/wordpress To: var/www/html
2: In phpmyadmin > wp_options > first row > remove wordpress from the url.
3: there is another entry of the url on the second page of the wp_options table. Change the url there too.

404 on Wordpress post permalinks

I'm getting a 404 when I click permalinks to my posts. I updated the .htaccess file per the documentation instructions but I still get them. That .htaccess code is in my /blog/ directory.
In my wp-admin control panel, I have it configured to do "post name" permalinks. The post permalinks work fine when I use the default, but they are 404'ing when I use the "post name" permalink setting.
Background: I'm on Apache/2.2.20 (Ubuntu) Server.
Just updating the .htaccess file would not do the trick. You need to find out if your mod_rewite.c module is enabled. If not, you need to enable it by going to console and typing in this:
sudo a2enmod rewrite
and afterwards restart your apache server.
service apache2 restart
If even that doesnt work, probably your userdir module is not enabled. For this reason you need to enable it
sudo a2enmod userdir
and then try enabling the rewrite module if still not enabled.
You can read up on this further here.
Is your mod_rewrite on?
Otherwise you'll need full URL like http://example.com/index.php/yyyy/mm/dd/post-name/
If only the "post name" setting doesn't work, it might be due to a conflict, maybe you have a post with a name that's also present on another post, page or category.
I Got Answer. It's easy only.
1) Go to WAMP logo in right-bottom of Task-bar of Windows.
2) Click left button
3) then Apache -> Apache Modules
4) Tic(select) the rewrite_module
5) that's all.

How to change URL in Wordpress

How to change URL in Wordpress?
my url in wordpress is
http://192.168.3.52/iskcon_src/?page_id=75
I want to change it to
http://192.168.3.52/iskcon_src/about
what I have done change in .htaccess file is
RewriteEngine on
**RewriteRule /iskcon_src/?page_id=75 /iskcon_src/about****
It shows The requested URL /iskcon_src/about was not found on this server.
please help me
have a look on the wordpress site,
just navigate to your admin, permalinks section, make sure to create your htaccess with write permissions, or copy and paste what wordpress generates at the bottom of the permalinks page afte ryou change the settings..
set your permalink settings to just /%postname%/
sudo cp ./mods-available/rewrite.load ./mods-enabled/
sudo /etc/init.d/apache2 restart
wordpress permalink will work and it will do itself

Drupal Acquia Stack - Have moved files to different folder, how to update site?

Im using the Acquia stack instead of MAMP or WAMP but im using it to run a normal Drupal installation.
I imported a site fine. Ive then moved the sites's files to a different folder, and now I cant figure out how to change the site's settings.
In the stack interface, if I go to my site and click settings > Sites > Edit
Then I can see the Site Path that it points to the old folder, but I cant change these settings.
Do I need to create a new site and import it again?
Thanks
I was looking for this answer, and digged out into acquia install folder. Here is what I did to change Site Path at acquia desktop interface.
Don't forget to make a backup just in case.
There are 4 files to attend to:
Open and edit static.ini and dynamic.ini under your AcquiaDevDesktopControlPanel at Program Files/acquia-drupal install folder. Maybe different on Mac.
Edit siteDir at static.ini
Edit selImportedSiteCodebase and codebaseDir at dynamic.ini
Edit httpd.conf at apache folder to use your new document root. There are 3 or 4 locations to change there
Edit vhosts.conf to reflect your new locations
You have to run the notepad as administrator.
Its seems that changing only #4 + #5 don't hurt my sites, these can be done via acquia interface. But changing #2 + #3 makes you feel comfortable :)
Hope that helps
I had the same question. I'm running Acquia Dev Desktop and wanted to change the default folder of the installation from /drupal-7.10 to /docroot.
I'm running this on a Mac and after reading the posts above, I searched for the dynamic.ini and static.ini files which were not to be found on my harddrive. Checked the httpd.conf file and didn't see anything mentioned.
I ended up making a backup copy of vhosts.conf and changed vhosts.conf to:
<VirtualHost *>
ServerName loc.MYWEBSITE.com
DocumentRoot "/Users/dv/Sites/MYWEBSITE/**new_dir_name**
<Directory "/Users/dv/Sites/MYWEBSITE/**new_dir_name**">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory<
<VirtualHost>
Refreshed the browser and I was good to go.
I ran into this problem as well, the only way I was able to remedy was to dump the database delete the project, then re-import. Just an FYI, make sure that the settings.php in Drupal are set up correctly for the localhost setup, this was another snafoo for me.
.. I looked all around the Acquia files to try to find a place where it was storing this information first but could not find it
In .htaccess, is the RewriteBase line pointing to the right directory? Ex:
RewriteBase /new/directory/
You'll also need to edit the - C:\Windows\System32\drivers\etc\hosts - file to update any entries
On Mac OS X you will need to find and edit paths in the following files:
~/.acquia/DevDesktop/locations.ini
~/.acquia/DevDesktop/Drush/Aliases/aliases.drushrc.php
/Applications/DevDesktop/apache/conf/vhosts.conf
/Applications/DevDesktop/apache/conf/httpd.conf
and, most importantly, in the DevDesktop package itself:
In /Applications/DevDesktop - right-click Acquia Dev Desktop
Select "Show Package Contents"
Edit datamodel.xml and static.ini

Resources