Remove the roll of toilet paper from the toilet paper holder if the roll is obstructing your view of how the device attaches to the wall. Inspect the holder where it meets to wall to determine how it fastens. Typically, toilet paper holders attach to the wall with screws.
Tighten each of the mounting screws with the appropriate size and style of screwdriver. If the screws tighten down firmly to the bracket against the wall, the toilet paper holder should be tightly attached. If the screws spin in their holes, the screws are likely stripped and will require further attention.
Unscrew the mounting screws and pull the toilet paper holder off the wall. If the screws are stripped and difficult to remove with a screwdriver, grab them by their heads with a pair of pliers and pull them out of the wall.
Push anchors into the holes left in the wall. If the anchors you choose will not fit the holes, hammer them into place with a hammer. To determine the correct size of anchor, screw the mounting screws into the anchor before inserting it in the wall. The screw should screw into the anchor with ease and not be overly tight or loose.
Place the toilet paper holder back on the wall and position it so its mounting holes are aligned with the anchors in the wall. Tighten the screws back into position. If the screws you removed were stripped or otherwise damaged, replace them. When the screws enter the anchors, they will hold firm and keep the toilet paper holder tight against the wall.