0

I am new to WordPress, I want that when I go to localhost I get my WordPress site, and I don't have to go to localhost/wordpress. This is because I am working with BuddyPress which does not work with installations where you give WordPress its own directory.

I am trying:

# /etc/apache2/sites-enabled/000-default.conf
DocumentRoot /var/www/html/wordpress

# /var/www/html/wordpress/wp-config.php
if ( !defined('ABSPATH') )
    define('ABSPATH', '/');

# /var/www/html/wordpress/wp-load.php
if ( !defined('ABSPATH') )
    define('ABSPATH', '/');

When I tried the first two files only, it worked partially: localhost rendered WordPress site but without style.

What is the usual approach to set this up? Am I doing the right thing: to move WordPress to root? or does BuddyPress is referring to other thing?

Update

apachectl -M | grep -i write
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
 rewrite_module (shared)

Links are pointing to http://localhost/wordpress/activity/ should I make them to point to http://localhost/activity/? how?

  • why do you not just move everything into html, rather than leave it in wordpress directory? – Milo Jul 22 '14 at 0:17
  • thanks, I did it but I am getting 404 when clicking in any buddypress link, I have mod_rewrite enabled, check my update – juanpastas Jul 22 '14 at 0:34
  • you did what? moved the files to root? if URLs are wrong, your site and home option values are incorrect. – Milo Jul 22 '14 at 1:26
  • yes, everything was messed up, check my solution. – juanpastas Jul 22 '14 at 17:48
0

After copying WordPress files in the DocumentRoot of Apache server. I found that URLs where rendered as wordpress/qwe.

So I removed all the files in DocumentRoot and installed WordPress again. By copying the contents, NOT the directory, of the downloaded WordPress to the DocumentRoot of Apache server.

Installation makes the URLs to be in the root: localhost/index.php and and the links in the pages also localhost/qwe, i.e. without wordpress.

I did not change anything in configuration files, everything I did was from the browser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.