WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Installation confused about plugin location

[Resolved] Installation confused about plugin location

  • Help please – our installation is confused about where to update its plugins.

    We first installed WordPress in a subdirectory and then we moved it to the root by following the instructions here

    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Within_Your_Site

    (and we ran the search and replace php script).

    So now, the plugins our installation uses are in the directory

    www/wp-content/plugins

    and those plugins work fine. If we manually upload a plugin to that directory, WordPress detects it, we can activate it, and it works normally.

    However, when it comes time to update, delete, or automatically install a plugin, our installation operates on the old directory:

    www/wp/wp-content/plugins

    I would like to fix this.

    Can anyone tell me where, in the database, is the information that tells WordPress where to operate on the installed plugins? This seems to be different than the information that tells it from where to LOAD the installed plugins. I would call this a BUG – but meanwhile, would like to find a way to correct this problem.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Perhaps check your wp-config.php

    Did you happen to have previously defined your plugins folder?

    http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder

    Thank you very much!

    Unfortunately, changing wp-config.php did not seem to help.

    For example, wp-config.php has this:

    define( ‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content’ );
    define( ‘WP_CONTENT_URL’, ‘http://sitename.com/wp-content’);

    (the text is not “sitename”, it is the actually web site name)

    I log into dashboard and it says I need to update two themes (twenty-ten and twenty-eleven).

    If I update them, it changes the content HERE:

    $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp/wp-content/themes’

    NOT here:

    $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content/themes’

    It says both updates are successful BUT as soon as I click “Dashboard”, it STILL says that two themes need to be updated.

    WordPress is READING our content from the correct location, but WRITING it to the wrong location!

    Any help will be appreciated enormously!

    esmi

    @esmi

    Forum Moderator

    Try commenting out those two lines in wp-config.php

    Example 2. I install a plugin and it lands here:

    $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp/wp-content/plugins’

    and I go to the plugins page and it is NOT THERE.

    I manually MOVE the new directory into this location:

    $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content/plugins’

    and THEN WordPress agrees that we have a new plugin installed.

    Any ideas?

    esmi wrote:

    Try commenting out those two lines in wp-config.php

    Thanks esmi but it makes no difference. It worked that way BEFORE I added those lines to wp-config.php, and it still works the same crazy way AFTER I added them in. I then went to the Settings page and clicked ‘Submit’ (without changing anything) but that made no difference either.

    esmi

    @esmi

    Forum Moderator

    When you moved this site, did you carry out a full search & replace of all urls in the database?

    I ran the “search and replace php script” but I cannot be 100% sure that it worked correctly. However, the site does run at its new location and WP READS the plugins, themes and so on from the correct location, it just continues to WRITE them (including updates) to the wrong one.

    Hence my original question in the first post above:

    Can anyone tell me where, in the database, is the information that tells WordPress where to operate on the installed plugins? This seems to be different than the information that tells it from where to LOAD the installed plugins. I would call this a BUG – but meanwhile, would like to find a way to correct this problem.

    esmi

    @esmi

    Forum Moderator

    I’d suggest looking in the wp_options table. As far as I can recall, the data should not be serialized.

    Thanks.

    I only found one entry with the string ‘/wp/’ in the option_value field.

    The option_name is “recently_edited” and the length of each sub-string (a total of five “s:xxx” values) is embedded in the data (error-prone for manual editing).

    It does not seem like the “recently_edited” row should be causing these problems. But then again, I don’t understand why “recently_edited” would be considered an “option” in the first place. I surely don’t know what effect this entry is supposed to have on the site behavior.

    esmi

    @esmi

    Forum Moderator

    That’s nothing to do with your plugins folder. Can you go through exactly what steps you used to move this site?

    1) Administration > Settings > General panel.

    2) Changed WordPress Address and Site Address from http://wp/sitename.com to http://sitename.com.

    3) Clicked “Save Changes”.

    4) Copied wp-admin, wp-content, wp-includes directories from public-html/wp to public-html.

    5) Copied .htaccess, index.php, xmlrpc.php, and all of the wp-*.php files from public-html/wp to public-html.

    6) Edited index.php (in the root directory). Changed “require(‘./wp/wp-blog-header.php’);” to “require(‘./wp-blog-header.php’);”.

    7) Ran the “Search and Replace for WordPress Databases Script” from here:

    Database Search and Replace Script in PHP

    Changed all matching references from “sitename/wp/” to “sitename/”.

    8) Opened the admin site which was a bit tricky. I don’t recall how I finally got into the site at this point.

    9) Administration > Settings > Permalinks

    10) Clicked “Save Changes”. The contents of sitename/.htaccess did not need to be changed; it already matched what was shown. It has the permalink code and nothing else.

    I think that’s it.

    esmi

    @esmi

    Forum Moderator

    So you didn’t follow the instructions in this Codex section?

    That is exactly what I followed, or tried to follow, as well as I could understand it.

    Can you point to something I did wrong?

    esmi

    @esmi

    Forum Moderator

    4) Copied wp-admin, wp-content, wp-includes directories from public-html/wp to public-html.

    Why did you copy and not move?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Resolved] Installation confused about plugin location’ is closed to new replies.
Skip to toolbar